0

Based on this question/answer, i implemented a grafana panel as following:

  • prometheus query:
count(count_over_time(kube_pod_created{cluster="$cluster", namespace="$namespace"}[$__range]))

enter image description here

  • Visualization

enter image description here

I go 56 pods!! enter image description here Unfortunately, the result is not realistic because this k8s namespace just created a while a go and runs only 2 pods

Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
  • 1
    Trying on my own Prometheus (2.30.3), I confirm the `count_over_time()` does not return the values I was expecting. A workaround could be to use something such as `count(kube_pod_created{namespace="xxx"} > (time() - 3600))` (checking pods starting in the last 3600s => 1h) – SYN Oct 31 '21 at 07:41
  • how to link it with the selected period ( $__range ) ? @SYN – Abdennour TOUMI Nov 02 '21 at 00:25

0 Answers0