Hello

We use PRTG for all of our uptime monitoring in our company. We track certian KPIs around uptime % which is then plugged into a corperate scorecard once per month.

Currently, this requires someone logging into PRTG once per month, and spending hours doing "historical" reports for the months for all of the sensors, and then using the "Uptime %" aggregate value that those reports offer.

Doing these reports on many sensors is very time consuming, so we would like to automate collecting this using the PRTG API. However, I can not seem to find an API call where I can say "for sensor xyz, what was the uptime between date1 and date2". Is there a way to do this? If so, could you point me to the correct examples or documents?

Thank you very much for your time.

Cheers, Chris


Article Comments

Dear Chris,

there are two ways to do this, either you use the API to get a "report" (as CSV, or XML) covering the period you want from the sensor you want, and then parse for the uptime stats (using regex or grep).
Or you could copy and modify the historicdata_html.htm and remove everything except the placeholder you need, and then use this copied file with the API to get the stats you want.

best regards.


May, 2011 - Permalink

Hi there. We too are using PRTG for uptime tracking/reporting. I tried the suggestions above, but still couldget what we are looking for. Everything we need is actually contained in /controls/sensorstatusdata.htm , but is there any way to set a date range for the data contained there? We'd like to see these stats, but only for a 24 hour period.


Apr, 2012 - Permalink