Skip to main content

Kubernetes metrics

This page lists the metrics collected by Kubernetes monitoring, organized by category. Each category includes its Tags (dimensions) and Fields (measurements).

  • Some metrics are also used in server monitoring and application monitoring.
  • To search or chart metrics directly, see Metrics Search and Metrics Chart.

Container(container) metrics

The container category collects all custom labels set on the container's pods as tags.

  • Target: Cluster project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes

Tags

TagTypeUnitDescription
agentOid--Node agent ID (unique)
agentPcode--Project code (unique)
command--Execution command
containerId--Container ID (unique)
containerKey--Container key
created--Time stamp generated by the container
image--Container image name
imageHash--Image hash value
imageId--Image ID
k8s-app--Value for the pod's label k8s-app
microOid--Unique ID of the WhaTap APM agent installed in the container
name--Container name
namespace--Namespace to which the container belongs
namespaceHash--Hash value of the namespace to which the container belongs
okind--Unique ID of OKIND specified in the WhaTap APM agent installed in the container
okindName--Name of OKIND specified in the WhaTap APM agent installed in the container
oname--Name of the WhaTap APM agent installed in the container
onode--Unique ID of the node agent on which the container is running
onodeName--Node name on which the container is running
podHash--Hash value of the container's Pod
podName--Container's Pod name
replicaSetHash--Hash value of the container's replica set
replicaSetName--Name of the container's replica set
whatap_project--Name of the WhaTap project to which the container belongs

Fields

FieldTypeUnitShortname/Name/Description
blkio_rbps-byteIoReadBytes
Container Block I/O Read Byte
Sum of bytes read per second across all block devices in the container
blkio_riops-countIoReadIops
Container Block I/O Read IOPS
Sum of counts read per second across all block devices in the container
blkio_wbps-byteIoWriteBytes
Container Block I/O Write Byte
Sum of bytes written per second across all block devices in the container
blkio_wiops-countIoWriteIops
Container Block I/O Write IOPS
Sum of counts written per second across all block devices in the container
cpu_per_quota-percentCpuByLimit
Container CPU usage by limit (%)
Container CPU utilization by limit
cpu_quota-millicoresCpuLimit
Container CPU Limit (core)
Container CPU Limit Quota
If the limit is not set, the total CPU cores of the node where the container is running appears in millicores
cpu_quota_percent-percentCpuLimitByNode
Container CPU Limit by Node(%)
Container CPU Limit quota relative to node CPU
- If Limit is not set, the total CPU cores of the node where the container is running are displayed as a percentage
cpu_sys-percentCpuSysByNode
Container CPU Sys Usage by Node(%)
Container CPU System Utilization against Node CPU
cpu_throttledperiods-countCpuThrottledCnt
Container CPU Throttling Count
Container CPU Throttled Count
cpu_throttledtime-nanosecond(ns)CpuThrottledTime
Container CPU Throttling Time
Container CPU Throttled Time
cpu_total-percentCpuByNode
Container CPU Usage by Node(%)
Container CPU Utilization against Node CPU
cpu_total_milli-millicoresCpuTotUsage
Container CPU Usage (millicore)
Container CPU Usage
cpu_user-percentCpuUserByNode
Container CPU User Usage by Node(%)
Container CPU User Utilization against Node CPU
cpu_request-millicoresCpuRequest
Container CPU Request (core)
Container CPU Request
cpu_per_request-percentCpuByRequest
Container CPU Usage by Request(%)
Utilization against Container CPU Request
= cpu_total_milli / cpu_request * 100
mem_failcnt-countMemFailCnt
Container Memory Failure Count
Container Memory Limit reached Count
mem_limit-byteMemLimit
Container Memory Limit (byte)
Container Memory Limit Size
mem_maxusage-byteMemMaxUsage
Container Memory Max Usage (byte)
Recorded maximum container memory usage
See the guide below for details.
mem_percent-percentMemWsByLimit
Container Memory Working Set by Limit(%)
Working Set Usage based on Container Memory Limit
= mem_usage / mem_limit * 100
mem_totalcache-byteMemTotCache
Container Memory Total Cache (byte)
Container's Total Cache Size
mem_totalpgfault-countMemTotPageFaultCnt
Container Memory Total Page Fault Count
Container's Page Fault Count
mem_totalrss-byteMemTotRss
Container Memory Total RSS (byte)
Container's Total RSS Memory Size
mem_totalrss_percent-percentMemTotRssByLimit
Container Memory Total RSS By Limit (%)
Container's Total RSS Memory Utilization
mem_totalunevictable-byteMemTotUnevictable
Container Memory Total Unevictable (byte)
Container's Total Unevictable Memory Size
mem_usage-byteMemUsage
Container Memory Usage (byte)
Container Memory Usage
mem_working_set-byteMemWs
Container Memory Working Set (byte)
Container memory working set
= mem_usage - inactive file
mem_working_set_percent-percentMemWsByLimit
Container Memory Working Set by Limit (%)
Working Set Usage based on Container Memory Limit
= mem_usage / mem_limit * 100
mem_request-byteMemRequest
Container Memory Request (byte)
Container Memory Request Size
mem_per_request-percentMemWsByRequest
Container Memory Working Set by Request (%)
Working Set Usage based on Container Memory Request
= mem_working_set / mem_request * 100
network_rbps-byteNetRxBytes
Container Network Receive Byte
Sum of bytes read per second across all block devices in the container
network_rdropped-byteNetRxDropped
Container Network Receive Dropped
Container Network Receive Dropped Count
network_rerror-byteNetRxError
Container Network Receive Error
Container Network Receive Error Count
network_riops-byteNetRxIops
Container Network Receive IOPS
Container Network Receive Error Count
network_wbps-byteNetTxByes
Container Network Transmit Byte
Container Network Transmit Data Size
network_wdropped-countNetTxDropped
Container Network Transmit Dropped
Container Network Transmit Dropped Count
network_werror-countNetTxError
Container Network Transmit Error
Container Network Transmit Error Count
network_wiops-countNetTxIops
Container Network Transmit IOPS
Container Network Transmit Error Count
node_cpu-percentConNodeCpu
Container Work Node CPU Usage (%)
CPU Usage of the Node where the container is running
node_mem-percentConNodeMem
Container Work Node Memory Usage (%)
Memory Usage of the Node where the container is running
phasestring-Pod lifecycle
① PENDING
② RUNNING
③ SUCCEEDED
④ FAILED
⑤ UNKNOWN
restart_countinteger-ConRestartCnt
Container Restart Count
Number of container restarts
stateinteger-ConState
Container Current State
Container State Code
① RUNNING = 114
② PAUSE = 112
③ RESTARTING = 101
④ OOMKILLED = 111
⑤ DEAD = 100
⑥ WAITING = 119
statusstring-ConStatus
Container Current Status
Container State Information
① running: Displays the uptime information
② waiting/terminated: Displays the reason of the state
Note

mem_maxusage indicates the maximum memory usage recorded while the container was running. However, if the Linux kernel version is lower than 5.19, the raw data for this metric may not be supported. In this case, the value may be displayed as 0. Update the Linux kernel version to 5.19 or later to collect this metric.

Kubernetes node (kube_node) metrics

The kube_node category collects all custom labels set on the node as tags.

  • Target: Cluster project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes, 1 hour

Tags

TagTypeUnitDescription
nodeName--Node name

The following tag has been added.

TagTypeUnitDescription
infrastructureTypestring-Node infrastructure type
- baremetal, vm, unknown

Fields

FieldTypeUnitDescription
allocatable_cpu-millicoresCPU size that can be assigned to node
allocatable_memory-byteMemory size that can be assigned to node
allocatable_podsinteger-Number of Pods that can be assigned to node
limit_cpu-millicoresSum of node CPU limits
limit_memory-byteSum of node memory limits
podsinteger-Total number of node Pods
request_cpu-millicoresSum of node CPU requests
request_memory-byteSum of node memory requests

The GPU quantity of a node is collected as parallel list fields by device type. *_types and *_counts correspond 1:1 by index, and hold nvidia.com/gpu (whole-GPU) and all MIG profiles (nvidia.com/mig-*) as individual entries.

FieldTypeUnitDescription
gpu_capacity_typeslist-List of device types of the node GPU capacity
gpu_capacity_countslistcountQuantity per type above for capacity (1:1 index correspondence)
gpu_allocatable_typeslist-List of device types of the node GPU allocatable
gpu_allocatable_countslistcountQuantity per type above for allocatable (1:1 index correspondence)
Note

Starting from v1.9.14, the whole-GPU-only scalar fields capacity_gpu and allocatable_gpu have been removed. This prevents the problem where, in MIG environments, the scalar fields hold only nvidia.com/gpu and omit MIG slices, making the aggregation a false total. The whole-GPU quantity is also checked from the nvidia.com/gpu entry in the list, and the total and per-type aggregations are the sum of *_counts.

CategoryRemoved scalar fieldReplacement list field
kube_nodecapacity_gpu, allocatable_gpugpu_capacity_types/gpu_capacity_counts, gpu_allocatable_types/gpu_allocatable_counts

Kubernetes node performance (kube_node_perf) metrics

The kube_node_perf category collects node-level performance metrics by summing up the resource usage and allocation of all Pods/Containers scheduled on the node.

  • Target: Cluster project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes, 1 hour

Tags

TagTypeUnitDescription
onode--Node hash value
onodeName--Node name
agentPcode--Agent project code
agentOid--Agent unique ID

The following tag has been added.

TagTypeUnitDescription
cgroup_version--cgroup mount mode of the node host
- unified (cgroup v2), hybrid, legacy (cgroup v1), unknown (inaccessible)

The /sys/fs/cgroup mount mode of the node host is detected directly and collected as a tag. You can aggregate the cgroup version status per node on the server.

The node virtualization determination tags have been added.

TagTypeUnitDescription
virtualizationstring-Whether the node is virtualized
- baremetal, vm, unknown
hypervisorstring-Hypervisor vendor name
- - for bare metal or when it cannot be determined

The vendor is first cross-checked against the DMI information of the node host (/sys/class/dmi/id/sys_vendor, product_name). If no vendor matches, only whether it is a virtual machine is determined by the hypervisor flag in /proc/cpuinfo. Non-x86 nodes without DMI information are collected as unknown.

Vendors such as QEMU/KVM, VMware, Hyper-V, Xen, VirtualBox, Parallels, Amazon EC2, Google GCE, OpenStack, Nutanix AHV, oVirt/RHV, and Alibaba Cloud are recognized. The value does not change while the node is running, so it is read once and cached.

Constraint: Bare metal provided by a cloud provider, such as an Amazon EC2 .metal instance, is not distinguishable from a general instance by DMI information alone and is determined as vm.

Collected on node agent 1.9.21 or later.

Fields

FieldTypeUnitDescription
cpuRequestlongmillicoresTotal CPU Request sum of all containers in the node
cpuLimitlongmillicoresTotal CPU Limit sum of all containers in the node
cpuTotallongmillicoresTotal CPU usage sum of all containers in the node
cpuPerRequestfloatpercentActual CPU utilization relative to node CPU Request
cpuPerLimitfloatpercentActual CPU utilization relative to node CPU Limit
memoryRequestlongbyteTotal Memory Request sum of all containers in the node
memoryLimitlongbyteTotal Memory Limit sum of all containers in the node
memTotallongbyteTotal Memory usage sum of all containers in the node
memoryPerRequestfloatpercentActual Memory utilization relative to node Memory Request
memoryPerLimitfloatpercentActual Memory utilization relative to node Memory Limit

The following fields have been added.

FieldTypeUnitDescription
conntrack_countlongcountCurrent number of conntrack entries
conntrack_maxlongcountUpper limit of conntrack entries (nf_conntrack_max)
conntrack_pctfloatpercentUsage against the upper limit
  • The number of entries is collected from the /proc/1/net/stat/nf_conntrack path to read the value based on the host network namespace.
  • Nodes where the nf_conntrack module is not loaded do not send the fields. This behavior distinguishes the value 0 from non-collection.
  • Collected on node agent 1.9.18 or later. You can turn the collection off with the collect_conntrack_enabled option.

Kubernetes event (kube_event) metrics

The kube_event category collects cluster-wide data for cluster projects, and collects data only for events that occurred in the namespace for namespace projects.

  • Target: Cluster project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes, 1 hour

Tags

TagTypeUnitDescription
field_path--Field Path
kind--Object type on which the event occurred
name--Kubernetes object name on which the event occurred
namespace--Namespace on which the event occurred
reason--Event occurrence cause
type--Event type
- Warning or Normal
uid--UID
- Object where an event occurred

Fields

FieldTypeUnitDescription
actionstring-Action name
count-countEvent occurrence count
event_timeinteger-Time stamp for the first event
first_timestampinteger-First event occurrence time
last_timestampinteger-Last event occurrence time
messagestring-Event Message
reasonFiledstring-Event reason
reporting_componentstring-Component that reports the current event
reporting_instancestring-Instance that reports the current event
series_last_observed_timeinteger-Series last observed time

Kubernetes Cluster (kube_stat) metrics

The kube_stat category collects all the clusters for the cluster project, and the namespace projects collects objects associated with the namespace.

  • Target: Cluster project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes, 1 hour

Tags

TagTypeUnitDescription
name--kube_stat (fixed value)

The following tag has been added.

TagTypeUnitDescription
namespace--Name of the namespace being collected

Fields

FieldTypeUnitDescription
alloctable_cpu-millicoresNumber of all cores in the cluster (cluster project only)
alloctable_ephemeral-storage-byteCluster-wide allocatable ephemeral storage (cluster project only)
alloctable_hugepages-1gi-byteCluster-wide allocatable hugepages-1Gi (cluster project only)
alloctable_hugepages-2mi-byteCluster-wide allocatable hugepages-2Mi (cluster project only)
alloctable_memory-byteTotal memory allocatable in the cluster (cluster project only)
alloctable_podsinteger-Number of pods that can be allocated
available_podinteger-Number of pods whose phase is in Running state
desired_podinteger-Sum of the number of pods deployed without metadata.ownerReferences and the number of desired pods defined in Kubernetes objects (ReplicaSet, Daemonset, StatefulSet)
Same as the number of pods retrieved by kubectl get pods -A
nodesinteger-Number of nodes
pod_phase_Pendinginteger-Number of pending pods
pod_phase_Runninginteger-Number of running pods
running_containersinteger-Number of running containers
stopped_containersinteger-Number of stopped containers
total_available_cpuinteger-Total allocatable CPU
total_available_memoryinteger-Total sum of allocatable memory
total_limit_cpu-millicoresTotal sum of limit CPU
total_limit_memory-byteTotal sum of limit memory
total_request_cpu-millicoresTotal sum of request CPU
total_request_memory-byteTotal sum of request memory
unavailable_podinteger-Number of pods whose phase is not in Running state (Pending, Failed, Succedded)
waiting_containersinteger-Waiting container count

The upper limits and consumption of the ResourceQuota configured for a namespace are collected. The following fields have been added.

FieldTypeUnitDescription
quota_countlongcountNumber of ResourceQuotas configured for the namespace
quota_request_cpu_hardlongmillicoresUpper limit of the CPU Request quota
quota_request_cpu_usedlongmillicoresConsumption of the CPU Request quota
quota_request_memory_hardlongbyteUpper limit of the Memory Request quota
quota_request_memory_usedlongbyteConsumption of the Memory Request quota
quota_limit_cpu_hardlongmillicoresUpper limit of the CPU Limit quota
quota_limit_cpu_usedlongmillicoresConsumption of the CPU Limit quota
quota_limit_memory_hardlongbyteUpper limit of the Memory Limit quota
quota_limit_memory_usedlongbyteConsumption of the Memory Limit quota
quota_pods_hardlongcountUpper limit of the Pod count quota
quota_pods_usedlongcountConsumption of the Pod count quota
  • The status.hard and status.used values calculated by Kubernetes are used as they are.
  • When a namespace has several ResourceQuotas with different scopes, the values are summed per item.
  • A namespace with no quota configured sends only quota_count as 0 and does not send the remaining fields. This behavior distinguishes no quota from an upper limit of 0.
  • Collected on master agent 1.9.17 or later.

Permission: The list permission for the core API resourcequotas is required in the ClusterRole. Without the permission, only the ResourceQuota collection is skipped and the rest of the kube_stat collection continues.

Pod (kube_pod) metrics

The kube_pod category collects all custom labels set on the Pod as tags.

  • Target: Master (cluster) project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes

Tags

TagTypeUnitDescription
agentOid--Node agent ID (unique)
agentPcode--Project code (unique)
command--Execution command
containerIds--Container ID that belongs to the Pod
containerIdsCount--Number of containerIds
containerKeys--Hash value for the container ID that belongs to the pod
containerKeysCount--Number of containerKeys
DaemonSet--DaemonSet name of the pod
Deployment--Deployment
k8s-app--Value for the pod's label k8s-app
microOid--ID of the agent running on the applications inside the Pod's container.
microOids--Multiple IDs of the agents running on applications inside multiple containers in the pod
microOidsCount--Number of microOids
name--Pod Name
onames--Name of the agent running on the applications inside the Pod's container.
onamesCount--Number of onames
podName--Pod Name
namespace--Namespace to which the Pod belongs
namespaceHash--Hash value of the namespace to which the Pod belongs
replicaSetHash--Hash value of ReplicaSet of the Pod
replicaSetName--ReplicaSet name of the Pod
whatap_project--Name of the WhaTap project to which the Pod belongs

Fields

FieldTypeUnitShortname, Name, Description
blkio_rbps-byteIoReadBytes
Pod Block I/O Read Byte
Sum of bytes read per second across all block devices in the Pod
blkio_riops-countIoReadIops
Pod Block I/O Read IOPS
Sum of cases read per second across all block devices in the Pod
blkio_wbps-byteIoWriteBytes
Pod Block I/O Write Byte
Sum of bytes written per second across all block devices in the Pod
blkio_wiops-countIoWriteIops
Pod Block I/O Write IOPS
Sum of cases written per second across all block devices in the Pod
cpu_per_limit-percentCpuByLimit
Pod CPU Usage by Limit (%)
Container CPU utilization by limit
cpu_per_request-percentCpuByRequest
Pod CPU Usage by Request (%)
Total CPU utilization based on the CPU requests
cpu_quota_percent-percentCpuLimitByNode
Pod CPU Limit by Node (%)
Pod CPU limit quota against the node
- If the limit is not set, the total CPU cores of the node where the Pod is running appears in percentage.
cpu_sys-percentCpuSysByNode
Pod CPU Sys Usage by Node (%)
Pod CPU System Utilization against Node CPU
cpu_throttledperiods-countCpuThrottledCnt
Pod CPU Throttling Count
Pod CPU Throttled Count
cpu_throttledtime-nanosecond(ns)CpuThrottledTime
Pod CPU Throttling Time
Pod CPU Throttled Time
cpu_total-percentCpuByNode
Pod CPU Usage by Node (%)
Pod CPU Utilization against Node CPU
cpu_total_milli-millicoresCpuTotUsage
Pod CPU Usage (millicore)
Pod CPU usage
cpu_user-percentCpuUserByNode
Pod CPU User Usage by Node (%)
Pod CPU User Utilization against Node CPU
cpu_request-millicoresCpuRequest
Pod CPU Request (core)
Pod CPU Request
cpu_per_request-percentCpuByRequest
Pod CPU Usage by Request (%)
Utilization against Pod CPU Request
= cpu_total_milli/cpu_request * 100
mem_totalcache-byteMemTotCache
Pod Memory Total Cache (byte)
Total Pod Cache Size
mem_totalpgfault-countMemTotPageFaultCnt
Pod Memory Total Page Fault Count
Pod's Page Fault Count
mem_totalrss-byteMemTotRss
Pod Memory Total RSS (byte)
Pod's Total RSS Memory Size
mem_totalrss_percent-percentMemTotRssByLimit
Pod Memory Total RSS by Limit (%)
Pod's Total RSS Memory Utilization
mem_totalunevictable-byteMemTotUnevictable
Pod Memory Total Unevictable (byte)
Pod's Total Unevictable Memory Size
mem_usage-byteMemUsage
Pod Memory Usage (byte)
Pod Memory Usage
mem_working_set-byteMemWs
Pod Memory Working Set (byte)
Pod Memory working set
= mem_usage - inactive file
memory_request-byteMemRequest
Pod Memory Request (byte)
Pod memory requests
memory_limit-byteMemLimit
Pod Memory Limit (byte)
Pod memory limit quota
memory_per_request-percentMemByRequest
Pod Memory Working Set by Request (%)
Working Set usage based on the Pod memory request
memory_per_limit-percentMemByLimit
Pod Memory Working Set by Limit (%)
Working Set usage based on the Pod memory limit
network_rbps-byteNetRxBytes
Pod Network Receive Byte
Sum of bytes read per second across all block devices in the Pod
network_rdropped-byteNetRxDropped
Pod Network Receive Dropped
Pod Network Receive Dropped Count
network_rerror-byteNetRxError
Pod Network Receive Error
Pod's network receive error count
network_riops-byteNetRxIops
Pod Network Receive IOPS
Pod Network Receive Count
network_wbps-byteNetTxByes
Pod Network Transmit Byte
Pod Network Transmit Data Size
network_wdropped-countNetTxDropped
Pod Network Transmit Dropped
Pod Network Transmit Dropped Count
network_werror-countNetTxError
Pod Network Transmit Error
Pod Network Transmit Error Count
network_wiops-countNetTxIops
Pod Network Transmit IOPS
Pod Network Transmit Count
phasestring-Phase
Pod Current Phase
Pod lifecycle
① PENDING
② RUNNING
③ SUCCEEDED
④ FAILED
⑤ UNKNOWN

The following fields are reserved for internal use.

FieldTypeUnitDescription
kube_sless_normal--Number of Kubernetes informative events
kube_sless_warning--Number of Kubernetes warning events
micro_sful_critical--Number of APM events that are critical
micro_sful_info--APM informative event count
micro_sful_warning--APM warning event count
micro_sless_critical--Number of APM events that are not critical
micro_sless_info--Number of APM events that are not informative
micro_sless_warning--Number of APM events that are not for warning
sful_critical--Number of events that are critical in the metric
sful_info--Number of events that are informative in the metric
sful_warning--Number of events that are for warning in the metric
sless_critical--Number of events that are not critical in the metric
sless_info--Number of events that are not informative in the metric
sless_warning--Number of events that are not for warning in the metric

The GPU Request and Limit quantities of a Pod are collected as parallel list fields by device type. *_types and *_counts correspond 1:1 by index, and hold nvidia.com/gpu (whole-GPU) and all MIG profiles (nvidia.com/mig-*) as individual entries.

FieldTypeUnitDescription
gpu_request_typeslist-List of device types of the Pod GPU Request
gpu_request_countslistcountQuantity per type above for Request (1:1 index correspondence)
gpu_limit_typeslist-List of device types of the Pod GPU Limit
gpu_limit_countslistcountQuantity per type above for Limit (1:1 index correspondence)
Note

Starting from v1.9.14, the whole-GPU-only scalar fields gpu_request and gpu_limit have been removed. This prevents the problem where, in MIG environments, the scalar fields hold only nvidia.com/gpu and omit MIG slices, making the aggregation a false total. The whole-GPU quantity is also checked from the nvidia.com/gpu entry in the list, and the total and per-type aggregations are the sum of *_counts.

Kubernetes Pod Statistics (kube_pod_stat) metrics

The kube_pod_stat category cluster project collects data for all clusters, and the namespace project collects data only for pods that belong to the namespace.

  • Target: Cluster project, Namespace project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes, 1 hour

Tags

TagTypeUnitDescription
kind--Type
- A cluster project has its fixed value, and a namespace project collects only the deployment or ReplicaSet.
name--Kubernetes resource name
- A cluster project has no name value and a namespace project has the name for Deployment or ReplicaSet.

Fields

FieldTypeUnitDescription
available_podinteger-Number of pods whose phase is in Running state
desired_podinteger-Sum of the number of pods deployed without metadata.ownerReferences and the number of desired pods defined in Kubernetes objects (ReplicaSet, Daemonset, StatefulSet)
Same as the number of pods retrieved by kubectl get pods -A
limit_cpu-millicoresCPU Limit Usage
limit_memory-byteMemory Limit Usage
request_cpu-millicoresCPU Request Usage
request_memory-byteMemory Request Usage
running_containerinteger-Running Container Count
stopped_containerinteger-Stopped Container Count
waiting_containerinteger-Waiting container count

Kubernetes Pod volume (kube_pod_volume) metrics

The kube_pod_volume category collects the capacity and i-node usage of volumes mounted on Pods running on a node. Since the directory name of an app Pod's PVC volume is the PV name, you can join it with the PVC's spec.volumeName using the volumeName tag.

Tags

TagTypeUnitDescription
hostDevice--Host device where the volume is located
hostFileSystem--File system of the volume
hostMountPath--Volume mount path on the host
volumeName--Volume name
- For a PVC volume, the PV name (e.g. pvc-...). Can be joined with the PVC's spec.volumeName
volumePlugin--Volume plugin
- e.g. kubernetes.io~csi, kubernetes.io~nfs, volume-subpaths

Fields

FieldTypeUnitDescription
capacitylongbyteTotal volume capacity
availablelongbyteAvailable volume capacity
availablePercentfloatpercentAvailable volume capacity ratio
usedPercentfloatpercentVolume usage
freelongbyteFree volume capacity
freePercentfloatpercentFree volume capacity ratio
totalInodelongcountTotal number of volume i-nodes
usedInodelongcountNumber of i-nodes in use in the volume
usedInodePercentfloatpercentVolume i-node usage

emptyDir volume collection has been added. A default (disk) medium emptyDir is a directory of the node root file system rather than a separate mount, so it was not caught by the df-based collection. The node agent queries the kubelet volume directory directly and sends the data to the same kube_pod_volume category.

  • Query path: {HOST_PREFIX}{kubelet_root_dir}/pods/{podUid}/volumes/kubernetes.io~empty-dir/{volumeName}
  • Collection interval: 60 seconds. Because querying directories is expensive, it is separated from the 5-second collection interval.
  • The volumePlugin tag value of an emptyDir volume is kubernetes.io~empty-dir.

The following tags have been added.

TagTypeUnitDescription
volumeTypestring-Volume type
- EmptyDir for an emptyDir volume
emptyDirMediumstring-Storage medium of the emptyDir
- Memory or Disk. Based on emptyDir.medium of the Pod spec; unspecified is Disk
emptyDirSpecConfirmedstring-Whether the Pod spec was checked
- true is a value confirmed by the spec, false is a value estimated from the kubelet path and the file system type

The following fields have been added.

FieldTypeUnitDescription
usedSpacelongbyteTotal volume usage
fileCountlongcountNumber of files in the volume
sizeLimitlongbyteemptyDir.sizeLimit of the Pod spec
- Not sent when it is not set
truncatedinteger-Whether the collection limit was exceeded
- 1 means the value is smaller than the actual one because the limit was hit

capacity, available, and usedPercent are sent only when the volume capacity can be determined.

  • When sizeLimit exists, that value is used as the volume capacity.
  • When there is no sizeLimit and the medium is Memory, the total tmpfs size created by kubelet is used as the capacity. The default total tmpfs size is half of the node memory.
  • A Disk medium without sizeLimit has no upper limit, so no capacity is created. In this case, compare it with the Pod's container.ephemeral_storage_limit.

All of the tags and fields above are sent on node agent 1.9.23 or later. For the collection activation and cost limit options, see Configuring the options for the Kubernetes agent.

Kubernetes Horizontal Pod Autoscaler (HPA) (kube_hpa_stat) metrics

Metric collection starts only when HPA is added to the ClusterRole used by WhaTap.

  • Target: Cluster project
  • Collection interval: 5 seconds
  • Statistical data: 5 minutes, 1 hour

Tags

TagTypeUnitDescription
name--HPA name

The following tags have been added.

TagTypeUnitDescription
scaleTargetKindstring-Kind of the scale target object (spec.scaleTargetRef.kind)
scaleTargetNamestring-Name of the scale target object (spec.scaleTargetRef.name)
scaleTargetApiVersionstring-API version of the scale target object
creationTimeMillislong-HPA creation time (epoch ms)
- Not sent when there is no value

The scale target of an HPA is in spec.scaleTargetRef. The owner_kind, owner_name, and owner_id tags based on ownerReferences are mostly empty for an HPA, so check the scale target with the scaleTarget* tags. The existing tags are kept for backward compatibility.

Collected on master agent 1.9.24 or later.

Fields

FieldTypeUnitDescription
currentReplicasintegercountCurrent Replica Count
desiredReplicasintegercountDesired Replica Count
lastScaleTimeintegercountLast scaled TimeStamp
maxReplicasintegercountMaximum Replica Count
minReplicasintegercountMinimum Replica Count

Kubernetes HPA list (kube_hpa) metrics

The kube_hpa category collects HPA list data equivalent to the result of kubectl get hpa -o wide. It is a separate category from kube_hpa_stat, which is a time series metric.

  • Target: Cluster project
  • Collection interval: 30 seconds
  • Required version: Master agent 1.9.24 or later

Tags

TagTypeUnitDescription
hpaUidstring-HPA UID (unique value)
hpaNamestring-HPA name
namespacestring-Namespace the HPA belongs to
creationTimeMillislong-HPA creation time (epoch ms)
scaleTargetKindstring-Kind of the scale target object
scaleTargetNamestring-Name of the scale target object
scaleTargetApiVersionstring-API version of the scale target object

Fields

FieldTypeUnitDescription
minReplicasintegercountMinimum replica count
maxReplicasintegercountMaximum replica count
currentReplicasintegercountCurrent replica count
desiredReplicasintegercountDesired replica count
targetMetricTypelist-List of metric types used as the scaling criteria
targetValuelist-List of target values per metric
currentValuelist-List of current values per metric
conditionAbleToScalestring-Status of the AbleToScale condition
conditionScalingActivestring-Status of the ScalingActive condition
conditionScalingLimitedstring-Status of the ScalingLimited condition

targetMetricType, targetValue, and currentValue are parallel lists where the same index corresponds to one metric. An HPA can have CPU, memory, and custom metrics at the same time, so it cannot be expressed with a single value.

  • The values are strings in the same notation as kubectl (for example, 50%, 100m).
  • When the current value cannot be obtained because metrics-server is absent, it is collected as <unknown>.
  • Besides Resource metrics, Pods, External, and Object metrics are stored with the pods:, external:, and object: prefixes respectively.
  • autoscaling/v2 is used first, and clusters that do not support it fall back to autoscaling/v1.

The horizontalpodautoscalers permission is already included in the ClusterRole, so no additional permission setting is required.

Process (kube_process) metrics

Note

Kubernetes agent 1.7.12 or later is required. For more information about agent updates, see the following.

Kubernetes-related processes that exist in the node are collected during monitoring.

  • Target: Cluster project, Namespace project

  • Collection interval: 5 seconds

  • Statistical data: 5 minutes

Tags

TagTypeUnitDescription
ppidstring-Parent process ID
/proc/[pid]/status::PPid
pidstring-Process ID
/proc/[pid]/status::Pid
cmd1string-Command name
/proc/[pid]/status::Name
cmd2string-Command line (all commands and arguments)
/proc/[pid]/cmdline
userstring-User ID or user name
/proc/[pid]/status::Uid
onodeNamestring-Node name of the process
Container system's environment variable (NODE_IP)
createTimeTimeStamp-Process start time
Field calculated through /proc/uptime

Fields

FieldTypeUnitDescription
cpufloatpercent(%)CPU utilization
- Field calculated through /proc/[pid]/stat
memoryfloatpercent(%)Memory utilization
- Field calculated through /proc/[pid]/statm
rsslongbyteActual memory usage (Resident Set Size)
- VmRSS of /proc/[pid]/status
uidstring-User ID or name
- Uid of /proc/[pid]/status
statestring-Process state
- State of /proc/[pid]/status
sharedMemorylongbyteShared memory size
- Field calculated through /proc/[pid]/statm
openFileDescriptorsinteger-Number of file descriptors that the process has open
- Field calculated through /proc/[pid]/fd
vmSizelongbyteVirtual memory size
- VmSize of /proc/[pid]/status
threadsinteger-Number of threads created by processes
- Threads of /proc/[pid]/status

Linux process status in the Kubernetes environment

On Linux, the State field in the /proc/[pid]/status file displays the current state of the process. The meanings of each status are as follows:

CodeDescription
R (Running)The process is running or ready to run.
S (Sleeping)Interruptible sleep state, waiting for an event.
D (Disk Sleep)Non-interruptible sleep state, waiting for an I/O operation.
R (Zombie)The process has been terminated, but the parent process has not yet collected its termination status.
T (Stopped)The process is stopped by a job control signal (such as SIGSTOP) or debugger.
t (Tracing stop)Tracing stopped
- State being traced by the debugger (indicated by a lowercase t)
X (Dead)Dead state
- The process is dead (commonly unseen)
x (Dead)Dead state
- The kernel thread is dead (commonly unseen)
K (WakeKill)Forcibly terminated
- It ignores any wakeup signal and is immediately dead.
W (Waking)Waking up
- State of being woken up after receiving a wake-up signal
I (Idle)Kernel thread is idle (usually invisible to user space processes).
Note

Because Kubernetes manages the resources of containers and nodes efficiently, many processes running in containers are actually in waiting state. As a result, most processes may be in Sleeping state.

Agent status (agent_status_summary) metrics

This category collects metrics related to agent status every 10 seconds.

Fields

FieldTypeUnitDescription
inActTime-millisecond(ms)Amount of time the agent remains inactive
isActiveBoolean-Whether the current agent is active or not (true / false)
isRestartBoolean-Whether the agent was restarted (true / false)
lastActTime-millisecond(ms)Last time when the agent was activated
- 0: Disabled
oid--Unique IDs for each agent in the project
oType--Agent type
- 1: Application agent
- 2: See subType
startTime-millisecond(ms)Timestamp indicating the time when the agent was started
subType--Agent type
-9: Node agent
- 10: Master agent

Ingress (kube_ingress) metrics

Note

Kubernetes agent 1.7.13 or later is required. For more information about agent updates, see the following.

It is collected when monitoring metadata and the related information for Ingress resources.

  • Target: Cluster project, Namespace project

  • Collection interval: 30 seconds

  • Statistical data: 5 minutes

Tags

TagTypeUnitDescription
ingressUidstring-Unique ID of the Ingress resource
ingressNamestring-Name of the Ingress resource
ingressNamespacestring-Namespace of the Ingress resource
creationTimeMillislongmillisecond(ms)Created time of the Ingress resource
ingressClassNamestring-Name of the Ingress class
ingressLoadBalancerIpsList-IP of the Ingress load balancer

Fields

FieldTypeUnitDescription
hostList-Host name that the Ingress resource listens to
(if *, it applies to all hosts)
pathList-Request path under a specific host
backendServiceNameList-Name of the service passed to the backend
backendServicePortList-Port number passed to the backend
backendServiceUidList-URL of the service passed to the backend
pathTypeList-Path matching method (e.g. Prefix, Exact)

Kubernetes cron job (kube_cronjob) metrics

It collects metadata and status information for deployment resources by using the tags.

Tags

TagTypeUnitDescription
cronJobNamestring-CronJob name (metadata.name)
namespacestring-CronJob namespace (metadata.namespace)
cronJobUidstring-CronJob UID (metadata.uid)

Fields

FieldTypeUnitDescription
lastScheduleTimestring-Last time when the CronJob was scheduled (status.lastScheduleTime)
lastSuccessfulTimestring-Last time when the CronJob succeeded (status.lastSuccessfulTime)
cronJobSpecSchedulestring-Scheduling cycle of the CronJob (spec.schedule, e.g.: "0 */5 * * *" )
successfulJobsHistoryLimitintegercountMaximum number of successful jobs to keep (spec.successfulJobsHistoryLimit)
failedJobsHistoryLimitintegercountMaximum number of failed jobs to keep (spec.failedJobsHistoryLimit)
concurrencyPolicystring-Concurrency policy (Allow, Forbid, Replace) (spec.concurrencyPolicy)
startingDeadlineSecondsintegersecondMaximum delay time when the job can be run after its scheduled time (spec.startingDeadlineSeconds)

Kubernetes deployment (kube_deployment) metrics

It collects metadata and status information for deployment resources by using the tags.

Tags

TagTypeUnitDescription
deployNamestring-Deployment name (metadata.name)
namespacestring-Deployment namespace (metadata.namespace)
deployUidstring-Deployment UID (metadata.uid )

Fields

FieldTypeUnitDescription
deployReadyReplicasintegercountNumber of Pods that are in ready status (status.readyReplicas)
deployTotalReplicasintegercountTotal number of set Pods (spec.replicas)
deployUpdatedReplicasintegercountNumber of Pods updated to the latest version (status.updatedReplicas)
deployAvailableReplicasintegercountNumber of Pods in available state (status.availableReplicas)
deployUnavailableReplicasintegercountNumber of Pods in unavailable state (status.unavailableReplicas)
deployCreationTimeintegermillisecond(ms)Deployment creation time (Unix Epoch milliseconds, metadata.creationTimestamp)
deploySelectorstring-Selector label of the deployment (spec.selector.matchLabels)
deployStrategystring-Deployment strategy (spec.strategy.type, e.g. RollingUpdate, Recreate)

Kubernetes daemonset (kube_daemonset) metrics

It collects metadata and status information for daemonset resources by using the tags.

Tags

TagTypeUnitDescription
daemonSetNamestring-DaemonSet name (metadata.name)
namespacestring-DaemonSet namespace (metadata.namespace)
daemonSetUidstring-DaemonSet UID (metadata.uid)
creationTimeintegermillisecond(ms)DaemonSet creation time (metadata.creationTimestamp)
agestring-Elapsed time since DaemonSet creation

Fields

FieldTypeUnitDescription
currentNumberScheduledintegercountNumber of scheduled Pods (status.currentNumberScheduled)
desiredNumberScheduledintegercountNumber of desired Pods (status.desiredNumberScheduled)
numberReadyintegercountNumber of Pods in ready state (status.numberReady)
numberAvailableintegercountNumber of available Pods (status.numberAvailable)
numberMisscheduledintegercountNumber of wrongly scheduled Pods (status.numberMisscheduled)
updatedNumberScheduledintegercountNumber of updated Pods (status.updatedNumberScheduled)
daemonSetSelectorstring-Selector label (spec.selector.matchLabels)

Kubernetes replica set (kube_replicaset) metrics

It collects metadata and status information for ReplicaSet resources with the tags.

Tags

TagTypeUnitDescription
replicaSetNamestring-ReplicaSet name (metadata.name)
namespacestring-ReplicaSet namespace (metadata.namespace)
replicaSetUidstring-ReplicaSet UID (metadata.uid)
ownerKindstring-Type of the upper layer object (e.g. Deployment) (metadata.ownerReferences.kind)
ownerNamestring-Name of the upper layer object (metadata.ownerReferences.name)
ownerUid string-UID of the upper layer object (metadata.ownerReferences.uid)
creationTimeintegermillisecond(ms)ReplicaSet creation time (metadata.creationTimestamp)
agestring-Elapsed time since creation of ReplicaSet

Fields

FieldTypeUnitDescription
replicaSetReplicasintegercountNumber of set Pods (spec.replicas)
replicaSetReadyReplicasintegercountNumber of Pods in ready state (status.readyReplicas)
replicaSetAvailableReplicasintegercountNumber of available Pods (status.availableReplicas)
replicaSetSelectorstring-Selector label (spec.selector.matchLabels)

Kubernetes stateful set (kube_statefulSet) metrics

It collects metadata and status information for Stateful resources with the tags.

Tags

TagTypeUnitDescription
statefulSetNamestring-Name of StatefulSet (metadata.name)
namespacestring-Namespace to which the StatefulSet belongs (metadata.namespace)
statefulSetUidstring-UIO of StatefulSet (metadata.uid)
creationTimeintegermillisecond(ms)StatefulSet creation time (metadata.creationTimestamp)
agestring-Elapsed time since StatefulSet creation

Fields

FieldTypeUnitDescription
replicasintegercountNumber of set Pods (spec.replicas)
readyReplicasintegercountNumber of Pods in ready state (status.readyReplicas)
currentReplicasintegercountNumber of created Pods (status.currentReplicas)
updatedReplicasintegercountNumber of updated Pods (status.updatedReplicas)
statefulSetSelectorstring-Selector label (spec.selector.matchLabels)

Kubernetes job (kube_job) metrics

It collects metadata and status information for deployment resources by using the tags.

Tags

TagTypeUnitDescription
jobNamestring-Job name (metadata.name)
namespacestring-Namespace of the Job (metadata.namespace)
jobUidstring-Job UID (metadata.uid)
ownerKindstring-Parent object kind (e.g. CronJob)
ownerNamestring-Parent object name
ownerUid string-Parent object UID

Fields

FieldTypeUnitDescription
succeededPodsintegercountNumber of successful jobs (status.succeeded)
failedPodsintegercountNumber of failed Pods (status.failed)
completionTimestring-Job completion time (status.completionTime.toString())
parallelismintegercountNumber of Pods set to run concurrently (spec.parallelism)
completionsintegercountNumber of Pod executions required for a job to be completed (spec.completions)
backoffLimitintegercountMaximum number of possible retries upon failure (spec.backoffLimit)
activeDeadlineSecondsintegersecond(sec)Maximum time for a job to run (spec.activeDeadlineSeconds)

Kubernetes NetworkPolicy (kube_network_policy) metrics

The kube_network_policy category collects the NetworkPolicy objects of the cluster on an event basis. Instead of periodic collection, a snapshot of that point in time is sent whenever an object is added, changed, or deleted.

  • Target: Cluster project, namespace project
  • Collection method: Event based

Tags

TagTypeUnitDescription
networkPolicyUidstring-NetworkPolicy UID (unique value)
networkPolicyNamestring-NetworkPolicy name
namespacestring-Namespace the NetworkPolicy belongs to
resourceVersionstring-Object revision (metadata.resourceVersion)

Fields

FieldTypeUnitDescription
generationlong-Object generation (metadata.generation)
creationTimeMillislong-Object creation time (epoch ms)
policyTypeslist-List of policy types
- Ingress, Egress. An empty list means Ingress, the API default
selectedPodUidslist-List of Pod UIDs selected by the policy
podSelectormap-Pod selector of the policy target (matchLabels, matchExpressions)
ingressRuleslist-List of Ingress rules
- Includes from and ports per rule
egressRuleslist-List of Egress rules
- Includes to and ports per rule
specSchemaVersioninteger-Schema version of the spec fields
specHashlong-Hash of the normalized spec
- Used to determine whether the content changed

The rules are sent in a nested structure to preserve the meaning of the Kubernetes API as it is.

  • namespaceSelector and podSelector within one peer are in an AND relationship.
  • The peer list and the rule list are in an OR relationship.
  • An empty from or to in a rule means all peers, and empty ports means all ports.
  • The ipBlock of a peer contains cidr and except.
  • A port contains protocol, portType, portNumber or portName, and endPort.

The networkpolicies view permission is required in the ClusterRole. You can turn the collection off with the collect_network_policy_enabled option.