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"><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
Add comment