Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The prometheus golang library provides builtin collectors for various process and golang metrics: https://pkg.go.dev/github.com/prometheus/client_golang@v1.12.2/prometheus/collectors. A list of metrics provided by cAdvisor is at https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md.

Example PromQL

Note: some of these require that kube-state-metrics is also deployed.

Pod ResourceTypePromQL
CPUUtilizationsum(rate(container_cpu_usage_seconds_total{namespace="emco"}[5m])) by (pod)
Saturationsum(rate(container_cpu_cfs_throttled_seconds_total{namespace="emco"}[5m])) by (pod)
MemoryUtilizationsum(container_memory_working_set_bytes{namespace="emco"}) by (pod)
Saturationsum(container_memory_working_set_bytes{namespace="emco"}) by (pod) / sum(kube_pod_container_resource_limits{namespace="emco",resource="memory",unit="byte"}) by (pod)
DiskUtilizationsum(irate(container_fs_reads_bytes_total{namespace="emco"}[5m])) by (pod, device)
sum(irate(container_fs_writes_bytes_total{namespace="emco"}[5m])) by (pod)
NetworkUtilizationsum(rate(container_network_receive_bytes_total{namespace="emco"}[1m])) by (pod)
sum(rate(container_network_transmit_bytes_total{namespace="emco"}[1m])) by (pod)

Internal errors and latency

...