What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

HTTP API Status of Sensort

Votes:

0

I would like to read the current state of sensor by using HTTP API. is that possible? I would like to pass the Object ID.

thanks for help

api http prtg xml

Created on Mar 18, 2013 1:56:03 PM



7 Replies

Votes:

0

Hi,
yes it is possible using the API to get the actual sensor state. In the API Documentation on your PRTG installation under Setup | PRTG API on tab Live Data the API call getobjectstatus is described which allows you to gather several information about a object in PRTG using the object ID.
A example call might look like follows:

/api/getobjectstatus.htm?id=objectid&name=status&show=text

Where all values described in section Supported Output Columns can be used in the name parameter of the API call.
Best regards

Created on Mar 18, 2013 2:55:55 PM by  Konstantin Wolff [Paessler Support]

Last change on Mar 20, 2013 6:47:57 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hi,

Thank you it works fine. How can i login, because now i become "Unauthorized". Do I have to sign up on the website? or I may have a different set up a session?

Created on Mar 20, 2013 6:35:14 AM



Votes:

0

Where exactly do you get the Unauthorized message?

Created on Mar 20, 2013 6:48:52 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

When i call the following page:

https://xxx/api/getobjectstatus.htm?id=13015&name=status&show=text

Created on Mar 20, 2013 6:53:24 AM

Last change on Mar 20, 2013 7:12:59 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Please try adding the parameters username and password resp. passhash to the requested URL. You would then end up with something like the following:

https://xxx/api/getobjectstatus.htm?id=13015&name=status&show=text&username=YOUR_USERNAME&password=YOUR_PASSWORD

or

https://xxx/api/getobjectstatus.htm?id=13015&name=status&show=text&username=YOUR_USERNAME&passhash=YOUR_PASSHASH

The passhash can be obtained from your user account settings from the PRTG web interface at Setup | My Account.

Created on Mar 20, 2013 7:15:43 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Thanks it's work fine!:) But how can i display this in c# or vb.net? Is there some example code?

Created on Mar 21, 2013 12:09:21 PM



Votes:

0

There is no example code available for the moment. Sorry. You might have a look at this HowTo which describes fetching of websites.
Best regards

Created on Mar 21, 2013 12:21:20 PM by  Konstantin Wolff [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.