Hi all

Im trying to get some information by doing two querys to the "values" and "messages" tables. Im getting the last value sorting by -datetime and using count=1. The problem is that i'm just getting the values from ranges of the last 5 minutes and i want it the most real time possible. It's any chance to solve this or another query?

1st query: https://prtgserverurl/api/table.json?content=messages&columns=datetime,parent,group&sortby=-datetime&count=1&id=2477&usecaption=true

2nd query: https://prtgserverurl/api/table.json?content=values&columns=datetime,value_&sortby=-datetime&count=1&id=2477&usecaption=true

It's important to get the data the most clearly as possible, i mean, without "[3 min ago]" or things like that, and getting all the requested info as tags of the JSON file

Sorry for my bad english.

thanks!


Article Comments

Hello jaguzmanb,

Thank you very much for your contact.

What's the configured scanning interval for the object #2477?
If the scanning interval is set to a considerably high interval, it will be not possible to gather anything close to real time, I'd assume.

Thank you very much in advance for your information.

Best regards,
Sebastian


Oct, 2018 - Permalink

Hello Sebastian,

The scanning interval is 1 minute. I hope to gather the info at least in that interval, not the 5 minutes im having.

Regards


Oct, 2018 - Permalink

Hello,

According to our API documentation this is the closest you can get. Please see 'Setup | PRTG API | Live Data' for further information.

Get details about a sensor in JSON:

/api/getsensordetails.json?id=sensorid

This will output the latest sensor results that match the information from the sensor's Overview tab.

Anyways, this leads to the fact that actual real time monitoring is not possible and the closest results are as old as the last sensor scan.

Best regards,
Sebastian


Oct, 2018 - Permalink