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.


Article Comments

Dear Ky0912

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

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


May, 2015 - Permalink

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.


Feb, 2016 - Permalink

Dear liverpool

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


Feb, 2016 - Permalink