5.1 Tasks: kube-prometheus metrics

Task 5.1.1: Memory usage of Prometheus

Task description:

  • Display the memory usage of both Prometheus pods
  • Use a filter to just display metrics from your prometheus containers
Hints
container_memory_working_set_bytes{namespace="<user>-monitoring", pod=~"prometheus-prometheus-.*", container="prometheus"}

Task 5.1.2: Kubernetes pod count

Task description:

  • Display how many pods are currently running on your Kubernetes platform
Hints

There are different ways to archive this. You can for example query all running containers and group them by pod and namespace.

count(sum(kube_pod_container_status_running == 1) by (pod,namespace,cluster))

You may also sum() all running pods on your Kubernetes nodes

sum(kubelet_running_pods)