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

No data when using the API for a specific sensor.

Votes:

0

To give some background on what I am doing here is pulling a large group of sensors and recording the values. Any sensor that has a value of 0/no data/null I am re-scanning and checking the value to make sure the sensor is truly down or just needs to be re-scanned. All of that works through the API without issue. When I check the live data of a single sensor using the API I get nothing back.

This is the query I am using when trying to get data for a specific sensor:

/api/table.csv?content=sensors&columns=lastvalue,&id={sensor ID}

I end up getting a CSV file with just a header and no information. I should add that this is a specific sensor on a device. If I use this same query using the device ID I get the information for all of the sensors on the device.

I should note that "content=channel" will give me a value even if the sensor is down or in an unknown state, which is not what I am looking to do.

api prtg sensors

Created on May 13, 2015 8:41:12 PM



3 Replies

Accepted Answer

Votes:

0

Dear Ky0912

Please use /api/getsensordetails.xml?id={sensor ID}

The output is an XML with many nodes, including <lastvalue>

Created on May 14, 2015 12:01:04 PM by  Arne Seifert [Paessler Support]



Votes:

0

Hello, I have the same issue. I don't have a reply from the support team yet. The last_value item of the API XML response show no value at all, for almost all my sensors. But all of them have correct values, looking into the dashboard. I have the latest version of PRTG (16), I have also restart the service a couple of times. But no info using the API service.

Created on Feb 2, 2016 2:10:59 PM



Votes:

0

Dear liverpool

Which API call are you using to query the sensor data?

Created on Feb 2, 2016 2:27:25 PM by  Arne Seifert [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.