Search code examples
kubernetesprometheusmonitoringgrafanaprometheus-node-exporter

How can I show server up time in Grafana?


I want to show the percentage of the server (or service) uptime in Grafana for the last month. The monitoring service collects data with Prometheus node exporter.

uptime % = ( up / down ) * 100

Solution

  • As MarceloÁviladeOliveira said I used Black-Box Exporter with this PromQL :

    avg_over_time(probe_success{job="$job",instance=~"$instance"}[30d]) * 100