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

  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 k8s_cluster 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_container_cpu_requestResource requested for the container.
k8s_container_cpu_limitMaximum resource limit set for the container.
k8s_container_memory_requestResource requested for the container.
k8s_container_memory_limitMaximum resource limit set for the container.
k8s_container_storage_limitMaximum resource limit set for the container.
k8s_container_ephemeralstorage_requestResource requested for the container.
k8s_container_ephemeralstorage_limitMaximum resource limit set for the container.
k8s_container_restartsNumber of times the container has restarted recently. Use this metric to check if restarts occurred (0 = no restarts, >0 = restarts occurred).
k8s_container_readyIndicates whether a container has passed its readiness probe (0 = No, 1 = Yes).
k8s_pod_phaseCurrent phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown).
k8s_pod_status_reasonCurrent status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4 - Shutdown, 5 - UnexpectedAdmissionError, 6 - Unknown).
k8s_deployment_desiredNumber of desired pods in this deployment.
k8s_deployment_availableTotal number of available pods (ready for at least minReadySeconds) targeted by this deployment.
k8s_cronjob_active_jobsThe number of actively running jobs for a cronjob.
k8s_daemonset_current_scheduled_nodesNumber of nodes running at least one daemon pod and are supposed to run the daemon pod.
k8s_daemonset_desired_scheduled_nodesNumber of nodes that should be running the daemon pod (including nodes currently running the daemon pod).
k8s_daemonset_misscheduled_nodesNumber of nodes running the daemon pod but not supposed to run it.
k8s_daemonset_ready_nodesNumber of nodes that should be running the daemon pod and have one or more ready daemon pods.
k8s_hpa_max_replicasMaximum number of replicas to which the autoscaler can scale up.
k8s_hpa_min_replicasMinimum number of replicas to which the autoscaler can scale down.
k8s_hpa_current_replicasCurrent number of pod replicas managed by the autoscaler.
k8s_hpa_desired_replicasDesired number of pod replicas managed by the autoscaler.
k8s_job_active_podsThe number of actively running pods for a job.
k8s_job_desired_successful_podsThe desired number of successfully finished pods for a job.
k8s_job_failed_podsThe number of pods which reached phase Failed for a job.
k8s_job_max_parallel_podsThe max desired number of pods the job should run at any given time.
k8s_job_successful_podsThe number of pods which reached phase Succeeded for a job.
k8s_namespace_phaseThe current phase of namespaces (1 for Active, 0 for Terminating).
k8s_replicaset_desiredNumber of desired pods in this replicaset.
k8s_replicaset_availableTotal number of available pods targeted by this replicaset.
k8s_replication_controller_desiredNumber of desired pods in this replication controller.
k8s_replication_controller_availableTotal number of available pods targeted by this replication controller.
k8s_resource_quota_hard_limitThe upper limit for a particular resource in a namespace. Sent only if a quota is specified.
k8s_resource_quota_usedThe usage for a particular resource in a namespace. Sent only if a quota is specified.
k8s_statefulset_desired_podsNumber of desired pods in the StatefulSet (the spec.replicas field).
k8s_statefulset_ready_podsNumber of pods created by the StatefulSet that are in the Ready condition.
k8s_statefulset_current_podsThe number of pods created by the StatefulSet controller from the StatefulSet version.
k8s_statefulset_updated_podsNumber of pods updated by the StatefulSet controller to the current version.
openshift_clusterquota_limitThe configured upper limit for a particular resource.
openshift_clusterquota_usedThe current usage for a particular resource with a configured limit.
openshift_appliedclusterquota_limitThe upper limit for a particular resource in a specific namespace.
openshift_appliedclusterquota_usedThe usage for a particular resource in a specific namespace.
k8s_node_conditionThe condition of a particular node.