SLA dashboard using grafana, prometheus and blackbox exporter

Hello Everyone,

I have a requirement to show my system’s up time as a report, I am using Blackbox exporter, Prometheus and Grafana for this.

Till now I was showing my system’s up time in percentage for specific time using Grafana with following expression

avg_over_time ( probe_success {instance=“myhost-url”,job=“blackbox-http”,module=“http_2xx”}[7d]) * 100"

Now there is a new requirement, were I have to show Up time percentage of my system per day for a week (including current day).

To put it in visualized form ,report has to be like bar graph, each bar graph represent percentage of system up time for a day, so when showing report for week, there will be 7 bar, one per day

The Y- axis represent up time percentage % , while X-axis represent the date (for last 7 day including current date).

Is it possible to represent this bar graph in Grafana, if yes would like to hear from you guys.

Thanks in advance.


Try this in the query:
count (probe_success{instance=“myhost-url”,job=“blackbox-http”,module=“http_2xx”} == 1) / count (probe_success{instance=“myhost-url”,job=“blackbox-http”,module=“http_2xx”)[7d] * 100

Then change the Query Options

Min Interval 1d

Fadjar T