Reputation: 41
I am trying to migrate a dashboard which shows the count of Readiness and Liveness Probe Failures, from Kibana(ElasticSearch) to a Grafana Dashboard(Sauron). In kibana the we can get both the probe failures separately using kubernetes.event.message : Liveness probe failed
for Liveness failure and similar event message for Readiness, but in Sauron or Thanos (which acts as the datasource for Grafana) k8's event messages are not picked up. So I am unable to find a suitable promQL which will give me the count of both the probe failures individually.
The closest promQL I have found is kube_event_count{reason="Unhealthy"}
which is giving me the sum of the count of both the probe failures. I need the count of the probe failures individually. Another promQL that I have tried is kube_pod_container_status_ready
which probably gives the readiness status of the containers but I am not sure about it.
Upvotes: 4
Views: 598
Reputation: 1167
The following two queries will do the trick for you:
prober_probe_total{probe_type="Readiness",result="failed"}
prober_probe_total{probe_type="Liveness",result="failed"}
Upvotes: 2