Overview
The Kube Cluster Receiver is responsible for collecting cluster-level metrics across all nodes, namespaces, and workloads. Instead of focusing on a single component, it provides a holistic view of the cluster. These metrics include node counts, pod counts, and high-level resource usage that give you visibility into the cluster’s overall state.
Why it’s Useful
- Helps with capacity planning by tracking node and workload growth.
- Detects imbalances between resource requests and availability.
- Serves as a baseline for comparing other component-level metrics.
What Users Can Do
- Monitor cluster-wide resource usage trends.
- Identify sudden spikes in workloads or node failures.
- Use as a starting point for troubleshooting performance bottlenecks.
- Tune scrape intervals for more real-time monitoring or reduced overhead.
Steps to Configure
- Get the existing ConfigMap.
kubectl get cm opsramp-k8s-infra-metric-user-config -n <agent-installed-namespace> -o yaml - Edit the ConfigMap.
kubectl edit cm opsramp-k8s-infra-metric-user-config -n <agent-installed-namespace> - Locate the
k8s_clustersection in ConfigMap.k8s_cluster: enabled: true config: scrape_interval: "2m" - Update the required parameters.
- Save and apply the changes.
Supported Metrics
| Metric Name | Description |
|---|---|
| k8s_container_cpu_request | Resource requested for the container. |
| k8s_container_cpu_limit | Maximum resource limit set for the container. |
| k8s_container_memory_request | Resource requested for the container. |
| k8s_container_memory_limit | Maximum resource limit set for the container. |
| k8s_container_storage_limit | Maximum resource limit set for the container. |
| k8s_container_ephemeralstorage_request | Resource requested for the container. |
| k8s_container_ephemeralstorage_limit | Maximum resource limit set for the container. |
| k8s_container_restarts | Number of times the container has restarted recently. Use this metric to check if restarts occurred (0 = no restarts, >0 = restarts occurred). |
| k8s_container_ready | Indicates whether a container has passed its readiness probe (0 = No, 1 = Yes). |
| k8s_pod_phase | Current phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown). |
| k8s_pod_status_reason | Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4 - Shutdown, 5 - UnexpectedAdmissionError, 6 - Unknown). |
| k8s_deployment_desired | Number of desired pods in this deployment. |
| k8s_deployment_available | Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. |
| k8s_cronjob_active_jobs | The number of actively running jobs for a cronjob. |
| k8s_daemonset_current_scheduled_nodes | Number of nodes running at least one daemon pod and are supposed to run the daemon pod. |
| k8s_daemonset_desired_scheduled_nodes | Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod). |
| k8s_daemonset_misscheduled_nodes | Number of nodes running the daemon pod but not supposed to run it. |
| k8s_daemonset_ready_nodes | Number of nodes that should be running the daemon pod and have one or more ready daemon pods. |
| k8s_hpa_max_replicas | Maximum number of replicas to which the autoscaler can scale up. |
| k8s_hpa_min_replicas | Minimum number of replicas to which the autoscaler can scale down. |
| k8s_hpa_current_replicas | Current number of pod replicas managed by the autoscaler. |
| k8s_hpa_desired_replicas | Desired number of pod replicas managed by the autoscaler. |
| k8s_job_active_pods | The number of actively running pods for a job. |
| k8s_job_desired_successful_pods | The desired number of successfully finished pods for a job. |
| k8s_job_failed_pods | The number of pods which reached phase Failed for a job. |
| k8s_job_max_parallel_pods | The max desired number of pods the job should run at any given time. |
| k8s_job_successful_pods | The number of pods which reached phase Succeeded for a job. |
| k8s_namespace_phase | The current phase of namespaces (1 for Active, 0 for Terminating). |
| k8s_replicaset_desired | Number of desired pods in this replicaset. |
| k8s_replicaset_available | Total number of available pods targeted by this replicaset. |
| k8s_replication_controller_desired | Number of desired pods in this replication controller. |
| k8s_replication_controller_available | Total number of available pods targeted by this replication controller. |
| k8s_resource_quota_hard_limit | The upper limit for a particular resource in a namespace. Sent only if a quota is specified. |
| k8s_resource_quota_used | The usage for a particular resource in a namespace. Sent only if a quota is specified. |
| k8s_statefulset_desired_pods | Number of desired pods in the StatefulSet (the spec.replicas field). |
| k8s_statefulset_ready_pods | Number of pods created by the StatefulSet that are in the Ready condition. |
| k8s_statefulset_current_pods | The number of pods created by the StatefulSet controller from the StatefulSet version. |
| k8s_statefulset_updated_pods | Number of pods updated by the StatefulSet controller to the current version. |
| openshift_clusterquota_limit | The configured upper limit for a particular resource. |
| openshift_clusterquota_used | The current usage for a particular resource with a configured limit. |
| openshift_appliedclusterquota_limit | The upper limit for a particular resource in a specific namespace. |
| openshift_appliedclusterquota_used | The usage for a particular resource in a specific namespace. |
| k8s_node_condition | The condition of a particular node. |