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

Missing two important column in sensor api rest

Votes:

0

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

bugreport enhancement missing question rest-api-sensor

Created on Jun 15, 2019 9:51:38 AM



3 Replies

Votes:

0

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

Created on Jun 17, 2019 11:55:47 AM by  Moritz Heller [Paessler Support]



Votes:

0

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

Created on Jun 17, 2019 10:42:47 PM



Votes:

0

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

Created on Jun 18, 2019 7:27:24 AM by  Moritz Heller [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.