Semantic conventions for Kubernetes metrics
Status: Development
K8s metrics
This document describes instruments and attributes for common K8s level metrics in OpenTelemetry. These metrics are collected from technology-specific, well-defined APIs (e.g. Kubelet’s API).
Metrics in k8s.
instruments SHOULD be attached to a K8s Resource
and therefore inherit its attributes, like k8s.pod.name
and k8s.pod.uid
.
Pod metrics
Description: Pod level metrics captured under the namespace k8s.pod
.
Metric: k8s.pod.uptime
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.pod.uptime | Gauge | s | The time the Pod has been running [1] | k8s.pod |
[1]: Instrumentations SHOULD use a gauge with type double
and measure uptime in seconds as a floating point number with the highest precision available.
The actual accuracy would depend on the instrumentation and operating system.
Metric: k8s.pod.cpu.time
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.pod.cpu.time | Counter | s | Total CPU time consumed [1] | k8s.pod |
[1]: Total CPU time consumed by the specific Pod on all available CPU cores
Metric: k8s.pod.cpu.usage
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.pod.cpu.usage | Gauge | {cpu} | Pod’s CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs [1] |
[1]: CPU usage of the specific Pod on all available CPU cores, averaged over the sample window
Metric: k8s.pod.memory.usage
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.pod.memory.usage | Gauge | By | Memory usage of the Pod [1] | k8s.pod |
[1]: Total memory usage of the Pod
Metric: k8s.pod.network.io
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.pod.network.io | Counter | By | Network bytes for the Pod | k8s.pod |
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
network.interface.name | string | The network interface name. | lo ; eth0 | Recommended | |
network.io.direction | string | The network IO operation direction. | transmit | Recommended |
network.io.direction
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
receive | receive | |
transmit | transmit |
Metric: k8s.pod.network.errors
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.pod.network.errors | Counter | {error} | Pod network errors | k8s.pod |
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
network.interface.name | string | The network interface name. | lo ; eth0 | Recommended | |
network.io.direction | string | The network IO operation direction. | transmit | Recommended |
network.io.direction
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
receive | receive | |
transmit | transmit |
Container metrics
Description: Container level metrics captured under the namespace k8s.container
.
Metric: k8s.container.status.state
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.status.state | UpDownCounter | {container} | Describes the number of K8s containers that are currently in a given state [1] | k8s.container |
[1]: All possible container states will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state will be non-zero.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.container.status.state | string | The state of the container. K8s ContainerState | terminated ; running ; waiting | Required |
k8s.container.status.state
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
running | The container is running. | |
terminated | The container has terminated. | |
waiting | The container is waiting. |
Metric: k8s.container.status.reason
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.status.reason | UpDownCounter | {container} | Describes the number of K8s containers that are currently in a state for a given reason [1] | k8s.container |
[1]: All possible container state reasons will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state reason will be non-zero.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.container.status.reason | string | The reason for the container state. Corresponds to the reason field of the: K8s ContainerStateWaiting or K8s ContainerStateTerminated | ContainerCreating ; CrashLoopBackOff ; CreateContainerConfigError ; ErrImagePull ; ImagePullBackOff ; OOMKilled ; Completed ; Error ; ContainerCannotRun | Required |
k8s.container.status.reason
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
Completed | The container has completed execution. | |
ContainerCannotRun | The container cannot run. | |
ContainerCreating | The container is being created. | |
CrashLoopBackOff | The container is in a crash loop back off state. | |
CreateContainerConfigError | There was an error creating the container configuration. | |
ErrImagePull | There was an error pulling the container image. | |
Error | There was an error with the container. | |
ImagePullBackOff | The container image pull is in back off state. | |
OOMKilled | The container was killed due to out of memory. |
Node metrics
Description: Node level metrics captured under the namespace k8s.node
.
Metric: k8s.node.uptime
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.uptime | Gauge | s | The time the Node has been running [1] | k8s.node |
[1]: Instrumentations SHOULD use a gauge with type double
and measure uptime in seconds as a floating point number with the highest precision available.
The actual accuracy would depend on the instrumentation and operating system.
Metric: k8s.node.allocatable.cpu
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.allocatable.cpu | UpDownCounter | {cpu} | Amount of cpu allocatable on the node | k8s.node |
Metric: k8s.node.allocatable.memory
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.allocatable.memory | UpDownCounter | By | Amount of memory allocatable on the node | k8s.node |
Metric: k8s.node.allocatable.ephemeral_storage
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.allocatable.ephemeral_storage | UpDownCounter | By | Amount of ephemeral-storage allocatable on the node | k8s.node |
Metric: k8s.node.allocatable.pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.allocatable.pods | UpDownCounter | {pod} | Amount of pods allocatable on the node | k8s.node |
Metric: k8s.node.condition.status
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.condition.status | UpDownCounter | {node} | Describes the condition of a particular Node. [1] | k8s.node |
[1]: All possible node condition pairs (type and status) will be reported at each time interval to avoid missing metrics. Condition pairs corresponding to the current conditions’ statuses will be non-zero.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.node.condition.status | string | The status of the condition, one of True, False, Unknown. [1] | true ; false ; unknown | Required | |
k8s.node.condition.type | string | The condition type of a K8s Node. [2] | Ready ; DiskPressure | Required |
[1] k8s.node.condition.status
: This attribute aligns with the status
field of the
NodeCondition
[2] k8s.node.condition.type
: K8s Node conditions as described
by K8s documentation.
This attribute aligns with the type
field of the
NodeCondition
The set of possible values is not limited to those listed here. Managed Kubernetes environments, or custom controllers MAY introduce additional node condition types. When this occurs, the exact value as reported by the Kubernetes API SHOULD be used.
k8s.node.condition.status
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
false | condition_false | |
true | condition_true | |
unknown | condition_unknown |
k8s.node.condition.type
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
DiskPressure | Pressure exists on the disk size—that is, if the disk capacity is low | |
MemoryPressure | Pressure exists on the node memory—that is, if the node memory is low | |
NetworkUnavailable | The network for the node is not correctly configured | |
PIDPressure | Pressure exists on the processes—that is, if there are too many processes on the node | |
Ready | The node is healthy and ready to accept pods |
Metric: k8s.node.cpu.time
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.cpu.time | Counter | s | Total CPU time consumed [1] | k8s.node |
[1]: Total CPU time consumed by the specific Node on all available CPU cores
Metric: k8s.node.cpu.usage
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.cpu.usage | Gauge | {cpu} | Node’s CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs [1] | k8s.node |
[1]: CPU usage of the specific Node on all available CPU cores, averaged over the sample window
Metric: k8s.node.memory.usage
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.memory.usage | Gauge | By | Memory usage of the Node [1] | k8s.node |
[1]: Total memory usage of the Node
Metric: k8s.node.network.io
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.network.io | Counter | By | Network bytes for the Node | k8s.node |
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
network.interface.name | string | The network interface name. | lo ; eth0 | Recommended | |
network.io.direction | string | The network IO operation direction. | transmit | Recommended |
network.io.direction
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
receive | receive | |
transmit | transmit |
Metric: k8s.node.network.errors
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.node.network.errors | Counter | {error} | Node network errors | k8s.node |
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
network.interface.name | string | The network interface name. | lo ; eth0 | Recommended | |
network.io.direction | string | The network IO operation direction. | transmit | Recommended |
network.io.direction
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
receive | receive | |
transmit | transmit |
Deployment metrics
Description: Deployment level metrics captured under the namespace k8s.deployment
.
Metric: k8s.deployment.desired_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.deployment.desired_pods | UpDownCounter | {pod} | Number of desired replica pods in this deployment [1] | k8s.deployment |
[1]: This metric aligns with the replicas
field of the
K8s DeploymentSpec.
Metric: k8s.deployment.available_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.deployment.available_pods | UpDownCounter | {pod} | Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment [1] | k8s.deployment |
[1]: This metric aligns with the availableReplicas
field of the
K8s DeploymentStatus.
ReplicaSet metrics
Description: ReplicaSet level metrics captured under the namespace k8s.replicaset
.
Metric: k8s.replicaset.desired_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.replicaset.desired_pods | UpDownCounter | {pod} | Number of desired replica pods in this replicaset [1] | k8s.replicaset |
[1]: This metric aligns with the replicas
field of the
K8s ReplicaSetSpec.
Metric: k8s.replicaset.available_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.replicaset.available_pods | UpDownCounter | {pod} | Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset [1] | k8s.replicaset |
[1]: This metric aligns with the availableReplicas
field of the
K8s ReplicaSetStatus.
ReplicationController metrics
Description: ReplicationController level metrics captured under the namespace k8s.replicationcontroller
.
Metric: k8s.replicationcontroller.desired_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.replicationcontroller.desired_pods | UpDownCounter | {pod} | Number of desired replica pods in this replication controller [1] | k8s.replicationcontroller |
[1]: This metric aligns with the replicas
field of the
K8s ReplicationControllerSpec
Metric: k8s.replicationcontroller.available_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.replicationcontroller.available_pods | UpDownCounter | {pod} | Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller [1] | k8s.replicationcontroller |
[1]: This metric aligns with the availableReplicas
field of the
K8s ReplicationControllerStatus
StatefulSet metrics
Description: StatefulSet level metrics captured under the namespace k8s.statefulset
.
Metric: k8s.statefulset.desired_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.statefulset.desired_pods | UpDownCounter | {pod} | Number of desired replica pods in this statefulset [1] | k8s.statefulset |
[1]: This metric aligns with the replicas
field of the
K8s StatefulSetSpec.
Metric: k8s.statefulset.ready_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.statefulset.ready_pods | UpDownCounter | {pod} | The number of replica pods created for this statefulset with a Ready Condition [1] | k8s.statefulset |
[1]: This metric aligns with the readyReplicas
field of the
K8s StatefulSetStatus.
Metric: k8s.statefulset.current_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.statefulset.current_pods | UpDownCounter | {pod} | The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision [1] | k8s.statefulset |
[1]: This metric aligns with the currentReplicas
field of the
K8s StatefulSetStatus.
Metric: k8s.statefulset.updated_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.statefulset.updated_pods | UpDownCounter | {pod} | Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision [1] | k8s.statefulset |
[1]: This metric aligns with the updatedReplicas
field of the
K8s StatefulSetStatus.
HorizontalPodAutoscaler metrics
Description: HorizontalPodAutoscaler level metrics captured under the namespace k8s.hpa
.
Metric: k8s.hpa.desired_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.desired_pods | UpDownCounter | {pod} | Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler [1] | k8s.hpa |
[1]: This metric aligns with the desiredReplicas
field of the
K8s HorizontalPodAutoscalerStatus
Metric: k8s.hpa.current_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.current_pods | UpDownCounter | {pod} | Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler [1] | k8s.hpa |
[1]: This metric aligns with the currentReplicas
field of the
K8s HorizontalPodAutoscalerStatus
Metric: k8s.hpa.max_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.max_pods | UpDownCounter | {pod} | The upper limit for the number of replica pods to which the autoscaler can scale up [1] | k8s.hpa |
[1]: This metric aligns with the maxReplicas
field of the
K8s HorizontalPodAutoscalerSpec
Metric: k8s.hpa.min_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.min_pods | UpDownCounter | {pod} | The lower limit for the number of replica pods to which the autoscaler can scale down [1] | k8s.hpa |
[1]: This metric aligns with the minReplicas
field of the
K8s HorizontalPodAutoscalerSpec
Metric: k8s.hpa.metric.target.cpu.value
This metric is opt-in.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.metric.target.cpu.value | Gauge | {cpu} | Target value for CPU resource in HPA config. [1] | k8s.hpa ; k8s.namespace |
[1]: This metric aligns with the value
field of the
K8s HPA MetricTarget.
If the type of the metric is ContainerResource
,
the k8s.container.name
attribute MUST be set to identify the specific container within the pod to which the metric applies.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.container.name | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (container.name ). | redis | Conditionally Required [1] | |
k8s.hpa.metric.type | string | The type of metric source for the horizontal pod autoscaler. [2] | Resource ; ContainerResource | Recommended |
[1] k8s.container.name
: if and only if k8s.hpa.metric.type is ContainerResource
[2] k8s.hpa.metric.type
: This attribute reflects the type
field of spec.metrics[] in the HPA.
Metric: k8s.hpa.metric.target.cpu.average_value
This metric is opt-in.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.metric.target.cpu.average_value | Gauge | {cpu} | Target average value for CPU resource in HPA config. [1] | k8s.hpa ; k8s.namespace |
[1]: This metric aligns with the averageValue
field of the
K8s HPA MetricTarget.
If the type of the metric is ContainerResource
,
the k8s.container.name
attribute MUST be set to identify the specific container within the pod to which the metric applies.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.container.name | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (container.name ). | redis | Conditionally Required [1] | |
k8s.hpa.metric.type | string | The type of metric source for the horizontal pod autoscaler. [2] | Resource ; ContainerResource | Recommended |
[1] k8s.container.name
: if and only if k8s.hpa.metric.type is ContainerResource
[2] k8s.hpa.metric.type
: This attribute reflects the type
field of spec.metrics[] in the HPA.
Metric: k8s.hpa.metric.target.cpu.average_utilization
This metric is opt-in.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.hpa.metric.target.cpu.average_utilization | Gauge | 1 | Target average utilization, in percentage, for CPU resource in HPA config. [1] | k8s.hpa ; k8s.namespace |
[1]: This metric aligns with the averageUtilization
field of the
K8s HPA MetricTarget.
If the type of the metric is ContainerResource
,
the k8s.container.name
attribute MUST be set to identify the specific container within the pod to which the metric applies.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.container.name | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (container.name ). | redis | Conditionally Required [1] | |
k8s.hpa.metric.type | string | The type of metric source for the horizontal pod autoscaler. [2] | Resource ; ContainerResource | Recommended |
[1] k8s.container.name
: if and only if k8s.hpa.metric.type is ContainerResource.
[2] k8s.hpa.metric.type
: This attribute reflects the type
field of spec.metrics[] in the HPA.
DaemonSet metrics
Description: DaemonSet level metrics captured under the namespace k8s.daemonset
.
Metric: k8s.daemonset.current_scheduled_nodes
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.daemonset.current_scheduled_nodes | UpDownCounter | {node} | Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod [1] | k8s.daemonset |
[1]: This metric aligns with the currentNumberScheduled
field of the
K8s DaemonSetStatus.
Metric: k8s.daemonset.desired_scheduled_nodes
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.daemonset.desired_scheduled_nodes | UpDownCounter | {node} | Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod) [1] | k8s.daemonset |
[1]: This metric aligns with the desiredNumberScheduled
field of the
K8s DaemonSetStatus.
Metric: k8s.daemonset.misscheduled_nodes
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.daemonset.misscheduled_nodes | UpDownCounter | {node} | Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod [1] | k8s.daemonset |
[1]: This metric aligns with the numberMisscheduled
field of the
K8s DaemonSetStatus.
Metric: k8s.daemonset.ready_nodes
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.daemonset.ready_nodes | UpDownCounter | {node} | Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready [1] | k8s.daemonset |
[1]: This metric aligns with the numberReady
field of the
K8s DaemonSetStatus.
Job metrics
Description: Job level metrics captured under the namespace k8s.job
.
Metric: k8s.job.active_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.job.active_pods | UpDownCounter | {pod} | The number of pending and actively running pods for a job [1] | k8s.job |
[1]: This metric aligns with the active
field of the
K8s JobStatus.
Metric: k8s.job.failed_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.job.failed_pods | UpDownCounter | {pod} | The number of pods which reached phase Failed for a job [1] | k8s.job |
[1]: This metric aligns with the failed
field of the
K8s JobStatus.
Metric: k8s.job.successful_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.job.successful_pods | UpDownCounter | {pod} | The number of pods which reached phase Succeeded for a job [1] | k8s.job |
[1]: This metric aligns with the succeeded
field of the
K8s JobStatus.
Metric: k8s.job.desired_successful_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.job.desired_successful_pods | UpDownCounter | {pod} | The desired number of successfully finished pods the job should be run with [1] | k8s.job |
[1]: This metric aligns with the completions
field of the
K8s JobSpec..
Metric: k8s.job.max_parallel_pods
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.job.max_parallel_pods | UpDownCounter | {pod} | The max desired number of pods the job should run at any given time [1] | k8s.job |
[1]: This metric aligns with the parallelism
field of the
K8s JobSpec.
CronJob metrics
Description: CronJob level metrics captured under the namespace k8s.cronjob
.
Metric: k8s.cronjob.active_jobs
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.cronjob.active_jobs | UpDownCounter | {job} | The number of actively running jobs for a cronjob [1] | k8s.cronjob |
[1]: This metric aligns with the active
field of the
K8s CronJobStatus.
Namespace metrics
Description: Namespace level metrics captured under the namespace k8s.namespace
.
Metric: k8s.namespace.phase
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.namespace.phase | UpDownCounter | {namespace} | Describes number of K8s namespaces that are currently in a given phase. | k8s.namespace |
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.namespace.phase | string | The phase of the K8s namespace. [1] | active ; terminating | Required |
[1] k8s.namespace.phase
: This attribute aligns with the phase
field of the
K8s NamespaceStatus
k8s.namespace.phase
has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Value | Description | Stability |
---|---|---|
active | Active namespace phase as described by K8s API | |
terminating | Terminating namespace phase as described by K8s API |
K8s Container metrics
Description: K8s Container level metrics captured under the namespace k8s.container
.
Metric: k8s.container.cpu.limit
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.cpu.limit | UpDownCounter | {cpu} | Maximum CPU resource limit set for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.cpu.request
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.cpu.request | UpDownCounter | {cpu} | CPU resource requested for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.memory.limit
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.memory.limit | UpDownCounter | By | Maximum memory resource limit set for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.memory.request
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.memory.request | UpDownCounter | By | Memory resource requested for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.storage.limit
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.storage.limit | UpDownCounter | By | Maximum storage resource limit set for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.storage.request
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.storage.request | UpDownCounter | By | Storage resource requested for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.ephemeral_storage.limit
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.ephemeral_storage.limit | UpDownCounter | By | Maximum ephemeral storage resource limit set for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.ephemeral_storage.request
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.ephemeral_storage.request | UpDownCounter | By | Ephemeral storage resource requested for the container [1] | k8s.container |
[1]: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details.
Metric: k8s.container.restart.count
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.restart.count | UpDownCounter | {restart} | Describes how many times the container has restarted (since the last counter reset) [1] | k8s.container |
[1]: This value is pulled directly from the K8s API and the value can go indefinitely high and be reset to 0 at any time depending on how your kubelet is configured to prune dead containers. It is best to not depend too much on the exact value but rather look at it as either == 0, in which case you can conclude there were no restarts in the recent past, or > 0, in which case you can conclude there were restarts in the recent past, and not try and analyze the value beyond that.
Metric: k8s.container.ready
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.container.ready | UpDownCounter | {container} | Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready) [1] | k8s.container |
[1]: This metric SHOULD reflect the value of the ready
field in the
K8s ContainerStatus.
Resource Quota metrics
Description: Resource Quota level metrics captured under the namespace k8s.resourcequota
.
Metric: k8s.resourcequota.cpu.limit.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.cpu.limit.hard | UpDownCounter | {cpu} | The CPU limits in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.cpu.limit.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.cpu.limit.used | UpDownCounter | {cpu} | The CPU limits in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.cpu.request.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.cpu.request.hard | UpDownCounter | {cpu} | The CPU requests in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.cpu.request.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.cpu.request.used | UpDownCounter | {cpu} | The CPU requests in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.memory.limit.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.memory.limit.hard | UpDownCounter | By | The memory limits in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.memory.limit.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.memory.limit.used | UpDownCounter | By | The memory limits in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.memory.request.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.memory.request.hard | UpDownCounter | By | The memory requests in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.memory.request.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.memory.request.used | UpDownCounter | By | The memory requests in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.hugepage_count.request.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.hugepage_count.request.hard | UpDownCounter | {hugepage} | The huge page requests in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.hugepage.size | string | The size (identifier) of the K8s huge page. | 2Mi | Required |
Metric: k8s.resourcequota.hugepage_count.request.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.hugepage_count.request.used | UpDownCounter | {hugepage} | The huge page requests in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.hugepage.size | string | The size (identifier) of the K8s huge page. | 2Mi | Required |
Metric: k8s.resourcequota.storage.request.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.storage.request.hard | UpDownCounter | By | The storage requests in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.storageclass.name | string | The name of K8s StorageClass object. | gold.storageclass.storage.k8s.io | Conditionally Required [1] |
[1] k8s.storageclass.name
: The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Metric: k8s.resourcequota.storage.request.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.storage.request.used | UpDownCounter | By | The storage requests in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.storageclass.name | string | The name of K8s StorageClass object. | gold.storageclass.storage.k8s.io | Conditionally Required [1] |
[1] k8s.storageclass.name
: The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Metric: k8s.resourcequota.persistentvolumeclaim_count.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.persistentvolumeclaim_count.hard | UpDownCounter | {persistentvolumeclaim} | The total number of PersistentVolumeClaims that can exist in the namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.storageclass.name | string | The name of K8s StorageClass object. | gold.storageclass.storage.k8s.io | Conditionally Required [1] |
[1] k8s.storageclass.name
: The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Metric: k8s.resourcequota.persistentvolumeclaim_count.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.persistentvolumeclaim_count.used | UpDownCounter | {persistentvolumeclaim} | The total number of PersistentVolumeClaims that can exist in the namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.storageclass.name | string | The name of K8s StorageClass object. | gold.storageclass.storage.k8s.io | Conditionally Required [1] |
[1] k8s.storageclass.name
: The k8s.storageclass.name
should be required when a resource quota is defined for a specific
storage class.
Metric: k8s.resourcequota.ephemeral_storage.request.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.ephemeral_storage.request.hard | UpDownCounter | By | The sum of local ephemeral storage requests in the namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.ephemeral_storage.request.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.ephemeral_storage.request.used | UpDownCounter | By | The sum of local ephemeral storage requests in the namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.ephemeral_storage.limit.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.ephemeral_storage.limit.hard | UpDownCounter | By | The sum of local ephemeral storage limits in the namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.ephemeral_storage.limit.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.ephemeral_storage.limit.used | UpDownCounter | By | The sum of local ephemeral storage limits in the namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Metric: k8s.resourcequota.object_count.hard
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.object_count.hard | UpDownCounter | {object} | The object count limits in a specific namespace. | ||
The value represents the configured quota limit of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the hard
field of the
K8s ResourceQuotaStatus.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.resourcequota.resource_name | string | The name of the K8s resource a resource quota defines. [1] | count/replicationcontrollers | Required |
[1] k8s.resourcequota.resource_name
: The value for this attribute can be either the full count/<resource>[.<group>]
string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See Kubernetes Resource Quotas documentation for more details.
Metric: k8s.resourcequota.object_count.used
This metric is recommended.
Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
---|---|---|---|---|---|
k8s.resourcequota.object_count.used | UpDownCounter | {object} | The object count limits in a specific namespace. | ||
The value represents the current observed total usage of the resource in the namespace. [1] | k8s.resourcequota |
[1]: This metric is retrieved from the used
field of the
K8s ResourceQuotaStatus.
Attribute | Type | Description | Examples | Requirement Level | Stability |
---|---|---|---|---|---|
k8s.resourcequota.resource_name | string | The name of the K8s resource a resource quota defines. [1] | count/replicationcontrollers | Required |
[1] k8s.resourcequota.resource_name
: The value for this attribute can be either the full count/<resource>[.<group>]
string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See Kubernetes Resource Quotas documentation for more details.
Feedback
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!