good evening i need an api request that returns me the status of a sensor by device ip and sensor name, how the request will be and i need the response as booelan.
API Sensor status request
Modified on 2025-06-10 22:03:19 +0200
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.
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.
Dear Cineco
This is a bit more complicated. The PRTG API identifies a sensor by its object ID. The status is not provided as boolean, is is encoded with an integer where value 3 is up, while other statuses are not up (down, warning, paused and so on.)
Devices are identified by their object ID as well. If you put the IP into the settings tab instead of the host name, you can iterate over each device and look for the ID in question. Using the object ID found, you can create a sensor list just for this device and look for a name. The relevant documentation is available via the PRTG webinterface, menu Setup | PRTG API.
Here is an example call for the device list:
Lets say the device in question has the ID 2099 and you now need a sensor list for that device. That looks like
If you prefer an XML output over CSV, replace table.csv with table.xml.
Sep, 2016 - Permalink