Global Metrics ΒΆ

This is a list of metrics exposed by nais for all applications.

Common Labels ΒΆ

The following labels are common to most metrics:

LabelDescription
namespaceThe Kubernetes namespace in which the application is running.
podThe name of the pod in which the application is running. This will be unique for each instance of your application.
containerThe name of the container in which the application is running. This will be the same as your application name.
serviceThe name of the service in which the application is running.
nodeThe name of the node on which the application is running.
imageThe name of the container image in which the application is running.

Memory and CPU Usage ΒΆ

Memory Usage ΒΆ

The container_memory_usage_bytes metric tracks the amount of memory used by a container.

promql

CPU Usage ΒΆ

The container_cpu_usage_seconds_total metric tracks the amount of CPU time used by a container.

promql

Since this metric is cumulative, you can calculate the rate of CPU usage by using the rate function.

promql

Limits and Requests ΒΆ

The kube_pod_container_resource_limits and kube_pod_container_resource_requests metrics track the resource limits and requests for a container.

promql

Out of Memory (OOMKilled) ΒΆ

Out of memory restarts occur when a container exceeds its memory limit and the kernel kills the process to free up memory. OOM kills can be caused by a variety of factors, including memory leaks, excessive memory usage, and insufficient memory limits.

The kube_pod_container_status_terminated_reason metric tracks the number of times a container has been terminated for various reasons, including OOM kills.

promql

Other reasons for container termination include Error, Completed, and ContainerCannotRun.