Overview

Kubelet Stats provide metrics from the kubelet on each node about pods, CPU, memory, and disk usage.

Why it’s Useful

  • Detects resource bottlenecks per node.
  • Ensures pods are scheduled to healthy nodes.
  • Helps identify memory leaks or runaway processes.

What Users Can Do

  • Monitor pod and node-level usage.
  • Track CPU/memory utilization trends.
  • Debug performance issues for workloads.

Steps to Modify Configuration

  1. Get the existing ConfigMap.
    kubectl get cm opsramp-k8s-infra-metric-user-config -n <agent-installed-namespace> -o yaml
  2. Edit the ConfigMap:
    kubectl edit cm opsramp-k8s-infra-metric-user-config -n <agent-installed-namespace>
  3. Locate the kubelet_stats section in ConfigMap.
    k8s_cluster:
      enabled: true
      config:
        scrape_interval: "2m"
  4. Update the required parameters.
  5. Save and apply the changes.

Supported Metrics

Metric NameDescription
k8s_node_cpu_usageTotal CPU usage (sum of all cores per second) averaged over the sample window.
k8s_node_cpu_utilizationNode CPU utilization.
k8s_node_cpu_timeTotal cumulative CPU time (sum of all cores) spent by the container, pod, or node since creation.
k8s_node_memory_availableNode memory available.
k8s_node_memory_usageNode memory usage.
k8s_node_memory_rssNode memory RSS.
k8s_node_memory_working_setNode memory working set.
k8s_node_memory_page_faultsNode memory page faults.
k8s_node_memory_major_page_faultsNode memory major page faults.
k8s_node_filesystem_availableNode filesystem available.
k8s_node_filesystem_capacityNode filesystem capacity.
k8s_node_filesystem_usageNode filesystem usage.
k8s_node_network_ioNode network I/O.
k8s_node_network_errorsNode network errors.
k8s_node_uptimeThe time since the node started.
k8s_pod_cpu_usageTotal CPU usage (sum of all cores per second) averaged over the sample window.
k8s_pod_cpu_utilizationPod CPU utilization.
k8s_pod_cpu_timeTotal cumulative CPU time (sum of all cores) spent by the container, pod, or node since creation.
k8s_pod_memory_availablePod memory available.
k8s_pod_memory_usagePod memory usage.
k8s_pod_cpu_node_utilizationPod CPU utilization as a ratio of the node's capacity.
k8s_pod_cpu_limit_utilizationPod CPU utilization as a ratio of the pod's total container limits. Metric not emitted if any container is missing a limit.
k8s_pod_cpu_request_utilizationPod CPU utilization as a ratio of the pod's total container requests. Metric not emitted if any container is missing a request.
k8s_pod_memory_node_utilizationPod memory utilization as a ratio of the node's capacity.
k8s_pod_memory_limit_utilizationPod memory utilization as a ratio of the pod's total container limits. Metric not emitted if any container is missing a limit.
k8s_pod_memory_request_utilizationPod memory utilization as a ratio of the pod's total container requests. Metric not emitted if any container is missing a request.
k8s_pod_memory_rssPod memory RSS.
k8s_pod_memory_working_setPod memory working set.
k8s_pod_memory_page_faultsPod memory page faults.
k8s_pod_memory_major_page_faultsPod memory major page faults.
k8s_pod_filesystem_availablePod filesystem available.
k8s_pod_filesystem_capacityPod filesystem capacity.
k8s_pod_filesystem_usagePod filesystem usage.
k8s_pod_network_ioPod network I/O.
k8s_pod_network_errorsPod network errors.
k8s_pod_uptimeThe time since the pod started.
container_cpu_usageTotal CPU usage (sum of all cores per second) averaged over the sample window.
container_cpu_utilizationContainer CPU utilization.
container_cpu_timeTotal cumulative CPU time (sum of all cores) spent by the container, pod, or node since creation.
container_memory_availableContainer memory available.
container_memory_usageContainer memory usage.
k8s_container_cpu_node_utilizationContainer CPU utilization as a ratio of the node's capacity.
k8s_container_cpu_limit_utilizationContainer CPU utilization as a ratio of the container's limits.
k8s_container_cpu_request_utilizationContainer CPU utilization as a ratio of the container's requests.
k8s_container_memory_node_utilizationContainer memory utilization as a ratio of the node's capacity.
k8s_container_memory_limit_utilizationContainer memory utilization as a ratio of the container's limits.
k8s_container_memory_request_utilizationContainer memory utilization as a ratio of the container's requests.
container_memory_rssContainer memory RSS.
container_memory_working_setContainer memory working set.
container_memory_page_faultsContainer memory page faults.
container_memory_major_page_faultsContainer memory major page faults.
container_filesystem_availableContainer filesystem available.
container_filesystem_capacityContainer filesystem capacity.
container_filesystem_usageContainer filesystem usage.
container_uptimeThe time since the container started.
k8s_volume_availableThe number of available bytes in the volume.
k8s_volume_capacityThe total capacity in bytes of the volume.
k8s_volume_inodesThe total inodes in the filesystem.
k8s_volume_inodes_freeThe free inodes in the filesystem.
k8s_volume_inodes_usedThe inodes used by the filesystem. This may not equal inodes - free because the filesystem may share inodes with other filesystems.