Kubernetes

Overview Copied

The Kubernetes Collection Agent plugin collects logs, metrics, and events from OpenShift and Kubernetes.

Note

Use the Kubernetes Collection Agent plugin version 6.3.3 or later to ensure reliable log retrieval through the Kubernetes API.

Prerequisites Copied

The Kubernetes Collection Agent plugin requires the following versions of Geneos components:

For more information about installing Collection Agent, see Collection Agent setup.

Note

This plugin also requires an additional licence to use. Please contact your ITRS Account Manager or ITRS Sales.

Permissions Copied

The Kubernetes Collection Agent plugin requires the following permissions:

Note

The plugin uses create on selfsubjectaccessreviews.authorization.k8s.io to determine whether it has ClusterRole permissions for the specified resources. If the plugin can’t perform this check, it assumes that access is allowed and continues. Actual API calls to namespaces, nodes, and nodes/proxy then succeed or fail based on the granted RBAC permissions.

Platform considerations Copied

Amazon EKS Fargate Copied

On Amazon EKS Fargate-only clusters, use readMode: api for log collection. The default readMode: filesystem requires host directory mounts that Fargate does not support.

Setting Fargate support
readMode: api Supported — collects logs via the Kubernetes API
readMode: filesystem Not supported — requires hostPath mounts to /var/log/containers, /var/log/pods, and /var/lib/docker/containers
Host volume mounts (Permissions section) Required only for readMode: filesystem; not available on Fargate
Privileged container Not supported on Fargate
persistenceDirectory Must be on a persistent volume. On Fargate, use an EFS-backed PVC (EFS CSI driver + EFS StorageClass or static PV). Do not use gp2 or gp3 EBS-backed PVCs.

For Netprobe Helm deployment on Fargate, set mode: StatefulSet. DaemonSet mode is not supported on Fargate. For more information, see Amazon EKS Fargate compatibility.

Configuration reference Copied

Below is an example YAML file which may require some changes for your project’s configuration. Ensure the plugin is properly configured to optimize resource consumption.

collectors:
- type: plugin
  name: kube-metrics
  className: KubernetesMetricsCollector
  
  # Whether to use OpenTelemetry semantic resource attribute names as dimension names where appropriate.
  # Defaults to false for backward compatibility, however, when possible it is recommended to enable.
  useOtelDimensions: false  

  # Whether to publish pre-normalized data points, i.e. with prescribed dimension hierarchies.
  # Defaults to false and is ignored if `useOtelDimensions` is false.
  publishNormalized: false
  
  # Optional name of the target kube cluster.
  # If present, the cluster dimension will be added to all data points.
  clusterName: ""

  # Collects data from specific nodes by name. If undefined or empty, data from all nodes will be collected.
  nodes: []
  
  # The `namespaces` and `namespaceSelectors` settings restrict the collection by namespace. 
  #
  # If both are undefined, all namespaces are collected. If both are defined, 
  # `namespaces` will have a higher priority, and `namespaceSelectors` will be ignored. 
  #
  # These settings can be defined here (which applies to both `events` and `metrics`), 
  # or under the `events` and `metrics` sections separately. If defined in both, 
  # the effective value is the union of both settings.

  # Restrict collection to specific namespaces.
  namespaces:
  - geneos       

  # Restrict collection to filtered namespaces based on label selectors.
  # In the case of multiple label selectors, a logical AND will be used to combine them.
  namespaceSelectors:
  - purpose=Production
  - department in (Engineering)

  # Whether to collect metrics/events for nodes and other non-namespaced resources. Defaults to false.
  excludeNonNamespaced: false

  # Events module configuration
  events:
  
    # Whether events collection is enabled.  Defaults to true.
    enabled: true

    # The `namespaces` and `namespaceSelectors` settings restrict the collection by namespace. 
    # If both are undefined, all namespaces are collected. If both are defined, 
    # `namespaces` will have a higher priority, and `namespaceSelectors` will be ignored. 
    # If values are listed here and above, the effective value is the union of both settings.
    
    # Restrict collection to specific namespaces.
    namespaces:
    - ns1

    # Restrict collection to filtered namespaces based on label selectors.
    # In the case of multiple label selectors, a logical AND will be used to combine them.
    namespaceSelectors:
    - purpose=Events

    # Name of the data point.  Default value shown.
    dataPointName: kubernetes_event

    # Which Kubernetes API to use when watching events. Valid values:
    #   false  - watch the `events.k8s.io/v1` API group (default).
    #   true   - watch the legacy core `events` API.

    useCoreEventsApi: false
  
  # Metrics module configuration
  metrics:
  
    # Whether metrics collection is enabled.  Defaults to true.
    enabled: true

    # Controls which Kubernetes resource types are collected.
    # All resources default to true (enabled) when not specified.
    resources:
      pods: true
      containers: true
      nodes: true
      deployments: true
      daemonSets: true
      statefulSets: true
      replicaSets: true
      jobs: true
      resourceQuotas: true
      namespaces: true

    # Number of milliseconds between reporting intervals.  Default value shown.
    reportingInterval: 10000

    # The `namespaces` and `namespaceSelectors` settings restrict the collection by namespace. 
    # If both are undefined, all namespaces are collected. If both are defined, 
    # `namespaces` will have a higher priority, and `namespaceSelectors` will be ignored. 
    # If values are listed here and above, the effective value is the union of both settings.

    # Restrict collection to specific namespaces.
    namespaces:
    - ns2

    # Restrict collection to filtered namespaces based on label selectors.
    # In the case of multiple label selectors, a logical AND will be used to combine them.
    namespaceSelectors:
    - purpose=Metrics

    # Controls which Kubernetes resource labels are published as datapoint properties and entity attributes.
    # Filtered labels are all published as entity attributes while datapoint properties are capped at 32 per
    # datapoint (excess keys dropped in lexicographic order with a warning).
    metadata:
      # Whether to use OpenTelemetry semantic conventions for label property and entity attribute names.
      # Defaults to false. Independent of the top-level `useOtelDimensions` setting.
      useOtelAttributes: false
      labels:
        # Label keys to publish. If non-empty, only these keys are included.
        # An empty list means all labels are published.
        include: []
        # Label keys to exclude from publishing. Ignored if include is non-empty.
        exclude: []

- type: plugin
  name: kube-logs
  className: KubernetesLogCollector
  
  # Whether to use OpenTelemetry semantic resource attribute names as dimension names where appropriate.
  # Defaults to false for backward compatibility, however, when possible it is recommended to enable.
  useOtelDimensions: false  

  # Whether to publish pre-normalized data points, i.e. with prescribed dimension hierarchies.
  # Defaults to false and is ignored if `useOtelDimensions` is false.
  publishNormalized: false
  
  # Optional name of the target kube cluster.
  # If present, the cluster dimension will be added to all data points.
  clusterName: ""
  
  # Defines the log reading method.
  # - `filesystem`: Reads logs directly from the file system.
  # - `api`: Retrieves logs via the Kubernetes API.
  # If not specified, defaults to `filesystem`.
  readMode: filesystem
  
  # Container log directory.
  # Required if `readMode` is `filesystem`.  On a Kubernetes or OpenShift node, logs are usually in /var/log/containers.
  logDirectory: /var/log/containers
  
  # Directory where the collector will save position files for each container log.
  # Required.  Must have read/write privileges to this directory.
  persistenceDirectory: /var/lib/itrs/collection-agent/log-collector
  
  # Whether to read newly discovered log files from the beginning of the file.
  # If false, only lines written to the log after the collector starts will be read.
  # Defaults to false.
  readFromBeginning: false
  
  # Number of worker threads (i.e. concurrent log readers).  Increasing this may improve 
  # performance, especially if there are several very active log files.
  # Default value shown.
  workerThreads: 5
  
  # Number of milliseconds to wait before pausing a worker that is blocking other workers from running.
  # Default value shown.
  longRunningWorkerThreshold: 30000

  # Number of milliseconds between log processing intervals, i.e. how long to wait before checking
  # if a log has new data to read. 
  # Default value shown.
  processingInterval: 5000

  # Collects data from specific nodes by name. If undefined or empty, data from all nodes will be collected.
  # This is only applicable when `readMode` is `api` since the 'filesystem' mode will only read logs from the local node.
  nodes: []

  # The `namespaces` and `namespaceSelectors` settings restrict the collection by namespace. 
  # If both are undefined, all namespaces are collected. If both are defined, 
  # `namespaces` will have a higher priority, and `namespaceSelectors` will be ignored. 
  
  # Restrict log collection to specific namespaces. Defaults to all namespaces.
  namespaces:
  - ns1
  - ns2

  # Restrict collection to filtered namespaces based on label selectors.
  # In the case of multiple label selectors, a logical AND will be used to combine them.
  namespaceSelectors:
  - purpose=Production
  - department in (Engineering)

  # Controls which Kubernetes resource labels are published as datapoint properties and entity attributes.
  # Filtered labels are all published as entity attributes while datapoint properties are capped at 32 per
  # datapoint (excess keys dropped in lexicographic order with a warning).
  metadata:
    # Whether to use OpenTelemetry semantic conventions for label property and entity attribute names.
    # Defaults to false. Independent of the top-level `useOtelDimensions` setting.
    useOtelAttributes: false
    labels:
      # Label keys to publish. If non-empty, only these keys are included.
      # An empty list means all labels are published.
      include: []
      # Label keys to exclude from publishing. Ignored if include is non-empty.
      exclude: []

Kubernetes log collection Copied

The Kubernetes Collection Agent plugin supports log collection on kubernetes clusters using containerd/CRI-O container runtimes.

Kubernetes log reading Copied

The Kubernetes Collection Agent plugin performs log reading from node storage by default and via the Kubernetes API.

To retrieve container logs through the Kubernetes API, ensure you meet the following requirements:

The readMode setting in the configuration determines the reading method. Logs can be read from the file system or via the Kubernetes API. Possible values are:

Warning

The Kubernetes Collection Agent plugin will not collect logs via API from pods in the Pending and Unknown phases.

Logs fetched via the Kubernetes API must follow this format:

<timestamp> <log>

For example:

2024-01-01T12:00:00Z Example log entry

Note

If log collection via API fails for all monitored containers, the collector halts and enters an unhealthy state.

Data persistence Copied

Label Selector configuration Copied

The namespaceSelectors setting follows the Label Selector that is described in the Kubernetes Documentation.

Additionally, this setting supports both the Equality-based and Set-based requirements.

Equality-based requirement Copied

namespaceSelectors:
- environment = production
- tier != frontend

Set-based requirement Copied

namespaceSelectors:
- environment in (production, qa)
- tier notin (frontend, backend)
- partition
- !partition

Collection of Kubernetes object labels Copied

Kubernetes labels are published in two ways:

  1. As properties on metric and log data points — attached to every published metric or log event for the resource. Use metadata.labels.include and metadata.labels.exclude to control which label keys are published.
  2. As entity attributes — one EntityAttribute data point per label key, including when labels change.

By default, label property and attribute names use the raw Kubernetes label key (for example, location). When metadata.useOtelAttributes is true, names use the OpenTelemetry convention k8s.<resource>.label.<label-key> (for example, k8s.pod.label.location). Resource quotas use k8s.resourcequota.label.<label-key>. This setting is independent of useOtelDimensions, which controls entity identity dimension names only.

A maximum of 32 properties can be published per data point. If more labels qualify for publishing than this limit allows, keys are applied in lexicographic order and excess keys are dropped. A throttled warning is logged that lists the dropped keys. Entity attributes are not subject to this limit.

An attribute that indicates the object kind is also published for each object:

kubernetes.itrsgroup.com/kind = [Node|Pod|etc...]

All attributes are published periodically: 30 seconds after startup and then every 5 minutes.

Use metrics and logs collectors together Copied

When you run KubernetesMetricsCollector and KubernetesLogCollector together, they must use the same publishing settings. The following settings must match: useOtelDimensions, publishNormalized, clusterName, and metadata (useOtelAttributes, labels.include, labels.exclude). If the second collector to start differs in any of these settings, it fails to start with a configuration error.

This requirement applies to all of the shared settings, not just metadata:

Data point properties always use each collector’s own metadata configuration. Because the settings must be identical when both collectors run, properties and entity attributes stay consistent for the shared fields.

While both collectors are running, entity attributes are published with the settings of the first collector to start.

Load an include file Copied

A sample kubernetes_mapping.xml include file for the Kubernetes Collection Agent plugin is provided in /templates directory of the downloaded Gateway binaries. To load an include file into the Gateway Setup Editor:

  1. Open the Gateway Setup Editor.
  2. In the Navigation panel, click Includes to create a new file.
  3. Enter the location of the file to include in the Location field.
  4. Update the Priority field. This can be any value except 1. If you input a priority of 1, the returns an error.
  5. Expand the file location in the Include section.
  6. Select Click to load.
  7. Click Yes to load the new include file and save your setup.

Collected metrics Copied

Metrics are collected from Kubernetes API objects, the Summary API of each node, and cAdvisor. The collector also scrapes a fixed Kubernetes-native set of kubelet /metrics and /metrics/cadvisor samples through the Kubernetes API server node proxy. Whether an endpoint is scraped, and which samples are published, is driven by the enabled metrics.resources. There is no dedicated toggle for these scrapes.

Note

Certain container and pod metrics collected from cAdvisor will subsequently be moved to CRI metric collection or potentially deprecated. For more information, see Kubernetes enhancements.

Node endpoint metrics Copied

The collector can scrape Prometheus-formatted kubelet endpoints through the Kubernetes API server’s node proxy:

The enabled metrics.resources control scraping:

Only samples in the fixed Kubernetes-native scrape set are published. The Kubernetes Collection Agent plugin ignores other kubelet and cAdvisor metric families. Use the Prometheus Collection Agent plugin for generic Prometheus scraping, such as metrics from node exporters, HAProxy, JVMs, applications, API servers, schedulers, or controller managers.

The collector preserves the original Prometheus metric names. It maps selected labels to Kubernetes Collection Agent plugin dimensions instead of publishing all labels. The cluster dimension is included when clusterName is configured. The internal Prometheus selector label prometheus_replica isn’t published.

The collector parses each cAdvisor response once from a bounded stream. It reuses the parsed samples for both cAdvisor-derived Kubernetes metrics and raw node-endpoint metrics.

Raw kubelet and cAdvisor samples are published without a unit. A usable Prometheus # TYPE declaration determines the data point type:

The kubelet /metrics and /metrics/cadvisor endpoints return their complete payloads before the collector applies local filtering. In larger clusters, enable only the required metrics.resources to avoid unnecessary scraping and metric publication.

Note

The cluster dimension is included only when clusterName is configured. It is omitted from the dimensions column below for clarity.
Metric Type Dimensions Description
kubelet_volume_stats_available_bytes gauge node, namespace, volume PVC available bytes from kubelet /metrics. The persistentvolumeclaim label is mapped to the volume dimension.
kubelet_volume_stats_capacity_bytes gauge node, namespace, volume PVC capacity bytes from kubelet /metrics. The persistentvolumeclaim label is mapped to the volume dimension.
kubelet_volume_stats_used_bytes gauge node, namespace, volume PVC used bytes from kubelet /metrics. The persistentvolumeclaim label is mapped to the volume dimension.
kubelet_volume_stats_inodes gauge node, namespace, volume PVC inode count from kubelet /metrics. The persistentvolumeclaim label is mapped to the volume dimension.
kubelet_volume_stats_inodes_used gauge node, namespace, volume PVC used inode count from kubelet /metrics. The persistentvolumeclaim label is mapped to the volume dimension.
container_cpu_usage_seconds_total counter node, namespace, pod, container Container CPU counter sample from kubelet /metrics/cadvisor.
container_memory_working_set_bytes gauge node, namespace, pod, container Container working set memory sample from kubelet /metrics/cadvisor.
container_network_receive_bytes_total counter node, namespace, pod, interface Pod network receive sample from kubelet /metrics/cadvisor.
container_network_transmit_bytes_total counter node, namespace, pod, interface Pod network transmit sample from kubelet /metrics/cadvisor.
container_fs_usage_bytes gauge node, namespace, pod, container, device Container filesystem usage sample from kubelet /metrics/cadvisor. The device label is mapped to the device dimension.
container_spec_memory_limit_bytes gauge node, namespace, pod, container Container memory limit sample from kubelet /metrics/cadvisor.
container_threads gauge node, namespace, pod, container Container thread count sample from kubelet /metrics/cadvisor.
container_threads_max gauge node, namespace, pod, container Container maximum thread count sample from kubelet /metrics/cadvisor.
container_spec_cpu_quota gauge node, namespace, pod, container Container CPU quota sample from kubelet /metrics/cadvisor.
container_spec_cpu_period gauge node, namespace, pod, container Container CPU period sample from kubelet /metrics/cadvisor.
machine_cpu_cores gauge node Machine CPU capacity sample from kubelet /metrics/cadvisor.
machine_memory_bytes gauge node Machine memory capacity sample from kubelet /metrics/cadvisor.

Namespace metrics Copied

Note

Namespace metrics will only be published when the ClusterRole permission for the namespaces resource is granted.
Metric Type Unit Dimensions Description
kube_namespace_status status namespace Describes the current state of the namespace. Possible values are Active and Terminating.

Node metrics Copied

Note

Node metrics will only be published when the ClusterRole permissions for nodes and nodes/proxy are granted.
Metric Type Unit Dimensions Description
kube_node_conditions status node Comma-delimited list of conditions of the node. Possible conditions are Ready, DiskPressure,MemoryPressure,PIDPressure, and NetworkUnavailable.
kube_node_info gauge node, kernel_version, os_image, container_runtime_version, kubelet_version, kubeproxy_version, pod_cidr, provider_id, system_uuid, internal_ip Kube-state-metrics-compatible node information metric with value 1.
kube_node_status_condition gauge node, condition, status Kube-state-metrics-compatible one-hot node condition status metric. The status dimension can be true, false, or unknown.
kube_node_cpu_capacity gauge millicores node Number of CPU cores on a node.
kube_node_cpu_allocatable gauge millicores node Number of allocatable CPU cores on a node.
kube_node_cpu_usage gauge % node Percentage of CPU usage from allocatable CPU cores of the node.
kube_node_cpu_core_usage gauge nanocores node CPU usage in nanocores (sum of all cores).
kube_node_cpu_usage_time counter nanoseconds node CPU usage in time (sum of all cores).
kube_node_created attribute node Node creation timestamp.
kube_node_kubelet_version attribute node Version of kubelet.
kube_node_kubeproxy_version attribute node Version of kube-proxy.
kube_node_mem_capacity gauge bytes node Bytes of memory on a node.
kube_node_mem_allocatable gauge bytes node Bytes of allocatable memory on a node.
kube_node_mem_used gauge bytes node Total memory in use.
kube_node_mem_free gauge bytes node Available memory for use.
kube_node_net_rx counter bytes node, interface Windowed count of bytes received since last sample.
kube_node_net_rx_rate gauge bytes/sec node, interface Windowed rate of bytes received since last sample.
kube_node_net_rx_errors counter node, interface Windowed count of errors received since the last sample.
kube_node_net_rx_error_rate gauge per sec node, interface Windowed rate of errors received since the last sample.
kube_node_net_tx counter bytes node, interface Windowed count of bytes sent since last sample.
kube_node_net_tx_rate gauge bytes/sec node, interface Windowed rate of bytes sent since last sample.
kube_node_net_tx_errors counter node, interface Windowed count of errors sent since last sample.
kube_node_net_tx_error_rate gauge per sec node, interface Windowed rate of errors sent since last sample.
kube_node_fs_size gauge bytes node, volume Size of the filesystem
kube_node_fs_used gauge bytes node, volume Number of bytes used.
kube_node_fs_usage gauge % node, volume

Percentage of the filesystem used.

The percentage is calculated by dividing kube_node_fs_used by kube_node_fs_size. Possible values can be any number between 0 and 100.

kube_node_fs_free gauge bytes node, volume Number of bytes free.
kube_node_fs_inodes_used gauge node, volume

Number of used inodes by the filesystem. Total number of inodes may not equal

kube_node_fs_inodes_free + kube_node_fs_inodes_used because this filesystem may share inodes with other filesystems.

kube_node_fs_inodes_free gauge node, volume Number of free inodes.
kube_node_taints attribute node Comma-delimited list of taints. Taints are described in key=<value>:effect format.

Note

Filesystem metrics for a node represent the root filesystem whose volume dimension is fs by default.

Pod metrics Copied

Pods filesystem metrics come from different dimensions:

Note

Some pod metrics will not be published when the ClusterRole permissions for nodes and nodes/proxy are not granted.

Pod metrics Copied

Metric Type Unit Dimensions Description
kube_pod_containers_ready gauge node, namespace, pod Number of ready containers.
kube_pod_containers_running gauge node, namespace, pod Number of running containers.
kube_pod_containers_terminated gauge node, namespace, pod Number of terminated containers.
kube_pod_containers_waiting gauge node, namespace, pod Number of waiting containers.
kube_pod_created attribute epoch_milliseconds node, namespace, pod Pod creation timestamp.
kube_pod_ip attribute node, namespace, pod Default IP address of the pod.
kube_pod_info gauge node, namespace, pod, uid, host_ip, pod_ip, created_by_kind, created_by_name, priority_class, host_network Kube-state-metrics-compatible pod information metric with value 1.
kube_pod_status_phase gauge node, namespace, pod, phase, uid Kube-state-metrics-compatible one-hot pod phase metric. The phase dimension can be Pending, Running, Succeeded, Failed, or Unknown.
kube_pod_status status node, namespace, pod

Status of the pod’s deployment.

Values: Pending, Running, Succeeded, Failed, Unknown, Deleted

Deleted is a phase that this plugin uses to report that a pod has been successfully deleted. It is not used by the Kubernetes Summary API.

kube_pod_status_condition status node, namespace, pod Latest status condition of the pod. Possible values are PodScheduled, ContainersReady, Initialized, and Ready.
kube_pod_status_condition_reason attribute node, namespace, pod Reason for the latest status condition of the pod.

Pod metrics available only when permissions to nodes and nodes/proxy are defined Copied

Metric Type Unit Dimensions Description
kube_pod_cpu_cfs_periods counter node, namespace, pod Number of elapsed enforcement period intervals of the pod. This is acquired using the cAdvisor.
kube_pod_cpu_cfs_throttled_periods counter node, namespace, pod Number of throttled period intervals of the pod. This is acquired using the cAdvisor.
kube_pod_cpu_cfs_throttled_seconds counter seconds node, namespace, pod Total time duration the pod has been throttled. This is acquired using the cAdvisor.
kube_pod_cpu_core_usage gauge nanocores node, namespace, pod CPU usage in nanocores (sum of all cores).
kube_pod_cpu_usage gauge % node, namespace, pod Percentage of CPU usage from allocatable CPU cores of the node.
kube_pod_cpu_usage_time counter nanoseconds node, namespace, pod CPU usage in time (sum of all cores).
kube_pod_fs_free gauge bytes node, namespace, volume Number of bytes free.
kube_pod_fs_inodes_free gauge node, namespace, volume Number of free inodes.
kube_pod_fs_inodes_used gauge node, namespace, volume

Number of used inodes in the filesystem. Total number of inodes may not equal

kube_pod_fs_inodes_free +

kube_pod_fs_inodes_used

because this filesystem may share inodes with other filesystems.

For ephemeral-storage volume, it reports the sum of kube_container_fs_inodes_used for every container rootfs volume in the current pod.

kube_pod_fs_size gauge bytes node, namespace, volume Size of the filesystem.
kube_pod_fs_usage gauge % node, namespace, volume

Percentage of the filesystem used.

The percentage is calculated by dividing kube_pod_fs_used by kube_pod_fs_size. Possible values can be any number between 0 and 100.

kube_pod_fs_used gauge bytes node, namespace, volume

Number of bytes used.

For ephemeral-storage volume, this is the sum of kube_container_fs_used from every container rootfs and logs storage plus the sum of kube_pod_fs_used for every volume of type emptyDir. For other volume types, it represents used bytes on the corresponding volume. See PodStats documentation.

kube_pod_mem_free gauge bytes node, namespace, pod Available memory for use.
kube_pod_mem_used gauge bytes node, namespace, pod Memory in use.
kube_pod_net_rx counter bytes node, namespace, interface Windowed count of bytes received since last sample.
kube_pod_net_rx_errors counter node, namespace, interface Windowed count of errors received since the last sample.
kube_pod_net_rx_error_rate gauge per sec node, namespace, interface Windowed rate of errors received since the last sample.
kube_pod_net_rx_rate gauge bytes/sec node, namespace, interface Windowed rate of bytes received since last sample.
kube_pod_net_tx counter bytes node, namespace, interface Windowed count of bytes sent since last sample.
kube_pod_net_tx_rate gauge bytes/sec node, namespace, interface Windowed rate of bytes sent since last sample.
kube_pod_net_tx_error_rate gauge per sec node, namespace, interface Windowed rate of errors sent since last sample.
kube_pod_net_tx_errors counter node, namespace, interface Windowed count of errors sent since last sample.
kube_pod_oom_events counter node, namespace, pod Count of out of memory events observed in the pod. This is acquired using the cAdvisor.

Container metrics Copied

Note

Some container metrics will not be published when the ClusterRole permissions for nodes and nodes/proxy are not granted.

Container metrics Copied

Metric Type Unit Dimensions Description
kube_container_cpu_limit gauge millicores node, namespace, pod, container

CPU resource limit.

See Kubernetes documentation for resource configuration details.

kube_container_cpu_limit_usage gauge % node, namespace, pod, container

Percentage used of the configured CPU resource limit.

See Kubernetes documentation for resource configuration details.

kube_container_cpu_request gauge millicores node, namespace, pod, container

CPU resource request.

See Kubernetes documentation for resource configuration details.

kube_container_mem_limit gauge bytes node, namespace, pod, container

Memory resource limit.

See Kubernetes documentation for resource configuration details.

kube_container_mem_request gauge bytes node, namespace, pod, container

Memory resource request.

See Kubernetes documentation for resource configuration details.

kube_container_mem_request_usage gauge % node, namespace, pod, container

Percentage used of the configured memory resource request.

See Kubernetes documentation for resource configuration details.

kube_container_status status node, namespace, pod, container

Current state of the container.

Values: Running, Terminated, Waiting, Unknown

kube_pod_container_status_restarts_total counter node, namespace, pod, container, uid Kube-state-metrics-compatible container restart count.
kube_pod_container_resource_requests gauge node, namespace, pod, container, resource, unit, uid Kube-state-metrics-compatible normal container CPU and memory resource requests.
kube_pod_init_container_resource_requests gauge node, namespace, pod, container, resource, unit, uid Kube-state-metrics-compatible init-container CPU and memory resource requests.

Container metrics available only when permissions to nodes and nodes/proxy are defined Copied

Metric Type Unit Dimensions Description
kube_container_cpu_cfs_periods counter node, namespace, pod, container Number of elapsed enforcement period intervals of the container. This is acquired using the cAdvisor.
kube_container_cpu_cfs_throttled_periods counter node, namespace, pod, container Number of throttled period intervals of the container. This is acquired using the cAdvisor.
kube_container_cpu_cfs_throttled_seconds counter seconds node, namespace, pod, container Total time duration the container has been throttled. This is acquired using the cAdvisor.
kube_container_cpu_core_usage gauge nanocores node, namespace, pod, container CPU usage in nanocores (sum of all cores).
kube_container_cpu_request_usage gauge % node, namespace, pod, container

Percentage of the configured CPU resource request.

See Kubernetes documentation for resource configuration details.

kube_container_cpu_usage gauge % node, namespace, pod, container Percentage of CPU usage from allocatable CPU cores of the node.
kube_container_cpu_usage_time counter nanoseconds node, namespace, pod, container CPU usage in time (sum of all cores).
kube_container_fs_free gauge bytes node, namespace, pod, container, volume Number of bytes free.
kube_container_fs_inodes_free gauge node, namespace, pod, container, volume Number of free inodes.
kube_container_fs_inodes_used gauge node, namespace, pod, container, volume

Number of used inodes in the filesystem. Total number of inodes may not equal

kube_container_fs_inodes_free + kube_container_fs_inodes_used

because this filesystem may share inodes with other filesystems.

For rootfs, this is the number of inodes used only by that container and does not count inodes used by other containers.

kube_container_fs_size gauge bytes node, namespace, pod, container, volume Size of the filesystem.
kube_container_fs_usage gauge % node, namespace, pod, container, volume

Percentage of the filesystem used.

The percentage is calculated by dividing kube_container_fs_used by kube_container_fs_size. Possible values can be any number between 0 and 100.

kube_container_fs_used gauge bytes node, namespace, pod, container, volume

Number of bytes used.

For rootfs volume reports, this is the number of bytes used for the container write layer; see Docker documentation. For logs, this is the number of bytes used for the container logs. For example, sudo ls -l --block-size=1 /var/lib/docker /containers/<container_id>/, and then get the total.

kube_container_mem_free gauge bytes node, namespace, pod, container Available memory for use.
kube_container_mem_limit_usage gauge % node, namespace, pod, container

Percentage used of the configured memory resource limit.

See Kubernetes documentation for resource configuration details.

kube_container_mem_rss gauge bytes node, namespace, pod, container Resident set size (RSS) memory in use.
kube_container_mem_used gauge bytes node, namespace, pod, container Memory in use.
kube_container_mem_working_set gauge bytes node, namespace, pod, container Working set memory in use.
kube_container_oom_events counter node, namespace, pod, container Count of out of memory events observed in the container. This is acquired using the cAdvisor.

ResourceQuota metrics Copied

Metric Type Unit Dimensions Description
kube_resource_quota_hard gauge millicores/bytes/none namespace, quota, resource Configured hard limit.
kube_resource_quota_used gauge millicores/bytes/none namespace, quota, resource Quota used amount.
kube_resource_quota_used_percent gauge % namespace, quota, resource Quota used percent.
kube_resourcequota gauge namespace, quota, resource, type Kube-state-metrics-compatible resource quota values. The type dimension is hard or used.

Workload/Deployment metrics Copied

Metric Type Unit Dimensions Description
kube_deployment_spec_replicas gauge namespace, deployment Number of desired pods.
kube_deployment_status_replicas gauge namespace, deployment Total number of non-terminated pods targeted by the deployment.
kube_deployment_status_replicas_ready gauge namespace, deployment Total number of ready pods targeted by the deployment.
kube_deployment_status_replicas_available gauge namespace, deployment Total number of available pods, which are ready for at least minReadySeconds, targeted by the deployment.
kube_deployment_status_replicas_unavailable gauge namespace, deployment Total number of unavailable pods targeted by the deployment. This is the required total number of pods for the deployment to have 100% available capacity. The pods may either be running but not yet available or have not been created yet.
kube_deployment_status_condition status namespace, deployment Describes the current state of the deployment.

Workload/DaemonSet metrics Copied

Metric Type Unit Dimensions Description
kube_daemonset_status_number_available gauge namespace, daemonset Number of nodes that are expected to run the daemon pod and have one or more running and available daemon pods.
kube_daemonset_status_number_unavailable gauge namespace, daemonset Number of nodes that are expected to run the daemon pod but not having running and available daemon pods.
kube_daemonset_status_current_number_scheduled gauge namespace, daemonset Number of nodes that are expected to run the daemon pod and have at least one running daemon pod.
kube_daemonset_status_desired_number_scheduled gauge namespace, daemonset Total number of nodes expected to run the daemon pod.
kube_daemonset_status_number_misscheduled gauge namespace, daemonset Number of nodes that are not expected to run the daemon pod but having a running daemon pod.
kube_daemonset_status_number_ready gauge namespace, daemonset Number of nodes that are expected to run the daemon pod and have one or more running and ready daemon pods.
kube_daemonset_status_condition status namespace, daemonset Describes the current state of the DaemonSet.

Workload/ReplicaSet metrics Copied

Metric Type Unit Dimensions Description
kube_replicaset_spec_replicas gauge namespace, replicaset Number of desired replicas.
kube_replicaset_status gauge namespace, replicaset Number of desired most recently observed replicas.
kube_replicaset_status_replicas_available gauge namespace, replicaset Number of available replicas, which are ready for at least minReadySeconds, in the replica set.
kube_replicaset_status_replicas_ready gauge namespace, replicaset Number of ready replicas for this replica set.
kube_replicaset_status_condition status namespace, replicaset Describes the current state of the replica set.

Workload/StatefulSet metrics Copied

Metric Type Unit Dimensions Description
kube_statefulset_spec_replicas gauge namespace, statefulset Desired number of replicas for the given template.
kube_statefulset_status_replicas_available gauge namespace, statefulset Number of pods created by the StatefulSet controller.
kube_statefulset_status_replicas_current gauge namespace, statefulset Number of pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.
kube_statefulset_status_replicas_ready gauge namespace, statefulset Number of pods created by the StatefulSet controller that have a Ready condition.
kube_statefulset_status_condition status namespace, statefulset Describes the current state of the stateful set.

Workload/Job metrics Copied

Metric Type Unit Dimensions Description
kube_job_spec_completions gauge namespace, job Desired number of successfully finished pods that should run with the job.
kube_job_spec_parallelism gauge namespace, job Maximum desired number of pods that should run with the job at any given time.
kube_job_status_active gauge namespace, job Number of actively running pods.
kube_job_status_succeeded gauge namespace, job Number of successful pods.
kube_job_status_failed gauge namespace, job Number of failed pods.
kube_job_status_start_time gauge epoch_milliseconds namespace, job Time when the job was acknowledged by the job controller.
kube_job_status_completion_time gauge epoch_milliseconds namespace, job Time when the job was completed.
kube_job_status_condition status namespace, job Describes the current state of the job.

Collected events Copied

Event Type Dimensions Description
log log event stream, namespace, node, pod, container, container_id

Note

Dimensions are always collected regardless of the readMode; however, stream is only available when reading from the file system.
Log from a container.

Kubernetes log rotation Copied

This table lists the supported options of the log collector rotation schemes:

Log rotation scheme Description
Log rotation for containers that implement CRI Supported
Logrotate create mode Supported
Logrotate copy mode Not supported
Logrotate copytruncate mode Not supported
Collecting from compressed log files Not supported
["Geneos"] ["Geneos > Netprobe"] ["User Guide"]

Was this topic helpful?