How to calculate the % of service uptime?


I am wondering on how to calculate the service % of uptime.

Lets say here the service is ping. i would like to calculate the ping service % uptime. i have the metrics stored in influxdb.

I am looking for the ping feature similar like in worldping APP. But i cant use this app on onpromise DC.

I am sure it can be achievable in grafana. But i dont know how to do it. ?

It is hard to do this in InfluxDB unfortunately. Graphite and Prometheus for example, support this in their query languages.

The section Binary Operators in this blog post ( mentions that it might be possible with Tickscript’s Join on.

Hi Danielle,

i am able to derive the service uptime. I think what i have done is correct.

I have taken the concept from nagios service/host uptime. they calculating the uptime from the logs. for example in the log, they are looking for ok/critical/warning etc. Based on the service status, they are calculate the %.

I have applied the same concept, i have forward all logs from sensu to elasticsearch. Using Pie chart, i can count the “check.status” value, here check status can be defined as 0,1,2,3 (0-success, 1-warning, 2-critical, 3-unknown)

Screen Shot 2017-06-28 at 4.26.35 PM

1 Like