I'm trying to extract daily uptime data for all the channels of a business processor sensor for a month at a time using the following URL: https://myprtginstance.com/api/historicdata.xml?id=3759&username=blahblah&passhash=1234567890&avg=86400&sdate=2021-07-01-00-00-00&edate=2021-08-01-00-00-00

And here is an extract of the data returned: <item> <datetime>27/07/2021</datetime> <datetime_raw>44404.9583333333</datetime_raw> <value channel="Global State (Up)" channelid="0">98 %</value> <value_raw channel="Global State (Up)" channelid="0">4294969705</value_raw> <value channel="Website (Up)" channelid="1">100 %</value> <value_raw channel="Website (Up)" channelid="1">4294969736</value_raw> <value channel="Rest API (Up)" channelid="2">98 %</value> <value_raw channel="Rest API (Up)" channelid="2">4294969705</value_raw> <value channel="Downtime" channelid="-4">&lt;1 %</value> <value_raw channel="Downtime" channelid="-4">0.2000</value_raw> <coverage>100 %</coverage> <coverage_raw>0000010000</coverage_raw> </item>

So, looking at the values, the "Website (Up)" channel was up for 100% of the day and the "Rest API (Up)" was up for 98%.

I want to use the raw values instead of the processed values as the processed values aren't precise enough but I just can't work out what they mean.

The "Website (Up)" channel has a value_raw of 4294969736 and the "Rest API (Up)" channel has a value_raw of 4294969705. I'd expect these values to be milliseconds or something like that but there are 86,400 seconds in a day and so it can't be seconds or milliseconds.

Also, if you assume that 4294969736 is 100% and 4294969705 is the uptime value that I'm looking for then you'd divide one by the other to get the % uptime. However, 4294969705 / 4294969736 = 99.99999928% which doesn't match the 99.8% listed in the extract.

Can someone please help me understand this data?

Thanks


Article Comments

If I'm not mistaken, this should be the amount of [edit] milliseconds the Sensor was up since the last restart of the PRTG Probe. Does Time since startup under <prtg server ip>/status.htm?tabid=1 match this? If my math is not wrong, it should be around 47 days at least. Let me know :)


Sep, 2021 - Permalink

Your maths does seem to be wrong or you've not seen that the number is 4 billion which is about 136 years. :)

If it were milliseconds then that would be nearly 50 days but I've checked the probe process start time and it was in January so that doesn't fit either.


Sep, 2021 - Permalink

Indeed, milliseconds xD Sorry - we'll pass this onto our devs to see what the numbers actually mean.


Sep, 2021 - Permalink

Hello Steve,

Short update: The "raw value" here lists some PRTG internal calculation component and cannot be directly calculated into the percentage value I'm afraid. Thank you for making us aware of this, we are looking into this to display the non-rounded percentage value instead in the future.

Kind Regards,
Timo Dambach
Paessler Tech Support


Sep, 2021 - Permalink