Hi, I'm trying to create a nagstamon-like script that displays the alarm data on prtg. In the Rest API I found many useful columns, but I noticed that the "ip address" column is missing under the sensor branch and above all there is no timestamp indicating the duration of the alarm. Is there a way to withdraw this data without downloading all the history and without using custom notification? I mean a date of last state change

Thank you, Leonardo Squillace


Article Comments

Hi Leonardo,

Thank you for your post.

Please note that you can only display the IP-Address if you request a list of devices and not Sensors, since Sensors do not have an IP-Address. If you want to display the IP-Address / DNS name, please use the column "host".
The PRTG API has a feature called "XML Table Query Builder". This query builder automatically creates a query for the required / defined columns. The "XML Table Query Builder" can be found in "Setup > PRTG API > Live Data". This tab also contains a list of all available columns. Among other columns, PRTG has the "downtimetime" column that displays the cumulated downtime of a sensor (in minutes/hours).

Best Regards,
Moritz Heller
Paessler Support Team


Jun, 2019 - Permalink

Thanks for the answer, for the ip I solved also taking the view of the devices and doing a join with the id, but my concern remains on the downtime not present on all the objects in the "warning" state, it seems to be present only on the state "down" .. how do I know how long a sensor is in a warning state?

Thanks, Leonardo Squillace


Jun, 2019 - Permalink

Hi Leonardo,

It's only possible to display the duration since a Sensor has been in the "Down" state. However, you can displays which Sensor is currently in the "Warning" state. This can be done via the "status" column or the "warnsens" column.

Best Regards,
Moritz Heller
Paessler Support Team


Jun, 2019 - Permalink