Mapping Legacy Sysdig Kubernetes Metrics with Prometheus Metrics

Prometheus metrics, in Kubernetes parlance, are nothing but Kube State Metrics. These metrics are available in Sysdig PromQL and can be mapped to existing Sysdig Kubernetes metrics.

For descriptions on Kubernetes State Metrics, see Kubernetes State Metrics.

Resource

Sysdig Metrics

Kubernetes State Metrics

Label

Example / More Information

Pod

kubernetes.pod.containers.waiting

kube_pod_container_status_waiting

  • container_name=<container-name>

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

kubernetes.pod.resourceLimits.cpuCores

kubernetes.pod.resourceLimits.memBytes

kube_pod_container_resource_limits

kube_pod_sysdig_resource_limits_memory_bytes

kube_pod_sysdig_resource_limits_cpu_cores

  • resource=<resource-name>

  • unit=<resource-unit>

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • kube_node_name=< node-name>

{kube_namespace_name="default",kube_pod_name="pod0",container="pod1_con1",resource="cpu",unit="core"}

{kube_namespace_name="default",kube_pod_name="pod0",container="pod1_con1",resource="memory",unit="byte"}

kubernetes.pod.resourceRequests.cpuCores

kubernetes.pod.resourceRequests.memBytes

kube_pod_container_resource_requests

kube_pod_sysdig_resource_requests_cpu_cores

kube_pod_sysdig_resource_requests_memory_bytes

  • resource=<resource-name>

  • unit=<resource-unit>

  • container_name=<container-name>

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • kube_node_name=< node-name>

{kube_namespace_name="default",kube_pod_name="pod0",container="pod1_con1",resource="cpu",unit="core"}

{kube_namespace_name="default",kube_pod_name="pod0",container="pod1_con1",resource="memory",unit="byte"}

kubernetes.pod.status.ready

kube_pod_status_ready

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • condition=<true|false|unknown>

kube_pod_info

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • host_ip=<host-ip>

  • kube_pod_name_ip=<pod-ip>

  • kube_node_name=<node-name>

  • kube_pod_uid=<pod-uid>

{kube_namespace_name="default",kube_pod_name="pod0",host_ip="1.1.1.1",pod_ip="1.2.3.4",kube_pod_uid="abc-0",kube_node_name="node1",created_by_kind="<none>",created_by_name="<none>",priority_class=""}

kube_pod_owner

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • owner_kind=<owner kind>

  • owner_name=<owner name>

{kube_namespace_name="default",kube_pod_name="pod0",owner_kind="<none>",owner_name="<none>;",owner_is_controller="<none>"}

kube_pod_labels

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • label_pod_label=<POD_LABEL>

{kube_namespace_name="default",kube_pod_name="pod0", label_app="myApp"}

kube_pod_container_info

  • kube_pod_name=<pod-name>

  • kube_namespace_name=<pod-namespace>

  • container_id=<containerid>

{kube_namespace_name="default",kube_pod_name="pod0",container="container2",image="k8s.gcr.io/hyperkube2",image_id="docker://sha256:bbb",container_id="docker://cd456"}

node

kubernetes.node.allocatable.cpuCores

kube_node_status_allocatable_cpu_cores

  • kube_node_name=<node-address>

  • resource=<resource-name>

  • unit=<resource-unit>

  • kube_node_name=<node-address>

resource/unit have one of the values: (cpu, core); (memory, byte); (pods, integer). Sysdig currently supports only CPU, pods, and memory resources for kube_node_status_capacity metrics.

"# HELP kube_node_status_capacity The capacity for different resources of a node.
kube_node_status_capacity{kube_node_name=""k8s-master"",resource=""hugepages_1Gi"",unit=""byte""} 0
kube_node_status_capacity{kube_node_name=""k8s-master"",resource=""hugepages_2Mi"",unit=""byte""} 0
kube_node_status_capacity{kube_node_name=""k8s-master"",resource=""memory"",unit=""byte""} 4.16342016e+09
kube_node_status_capacity{kube_node_name=""k8s-master"",resource=""pods"",unit=""integer""} 110
kube_node_status_capacity{kube_node_name=""k8s-node1"",resource=""pods"",unit=""integer""} 110
kube_node_status_capacity{kube_node_name=""k8s-node1"",resource=""cpu"",unit=""core""} 2
kube_node_status_capacity{kube_node_name=""k8s-node1"",resource=""hugepages_1Gi"",unit=""byte""} 0
kube_node_status_capacity{kube_node_name=""k8s-node1"",resource=""hugepages_2Mi"",unit=""byte""} 0
kube_node_status_capacity{kube_node_name=""k8s-node1"",resource=""memory"",unit=""byte""} 6.274154496e+09
kube_node_status_capacity{kube_node_name=""k8s-node2"",resource=""hugepages_1Gi"",unit=""byte""} 0
kube_node_status_capacity{kube_node_name=""k8s-node2"",resource=""hugepages_2Mi"",unit=""byte""} 0
kube_node_status_capacity{kube_node_name=""k8s-node2"",resource=""memory"",unit=""byte""} 6.274154496e+09
kube_node_status_capacity{kube_node_name=""k8s-node2"",resource=""pods"",unit=""integer""} 110
kube_node_status_capacity{kube_node_name=""k8s-node2"",resource=""cpu"",unit=""core""} 2

kubernetes.node.allocatable.memBytes

kube_node_status_allocatable_memory_bytes

kubernetes.node.allocatable.pods

kube_node_status_allocatable_pods

kubernetes.node.capacity.cpuCores

kube_node_status_capacity_cpu_cores

  • kube_node_name=<node-address>

  • resource=<resource-name>

  • unit=<resource-unit>

  • kube_node_name=<node-address>

kubernetes.node.capacity.memBytes

kube_node_status_capacity_memory_bytes

kubernetes.node.capacity.pod

kube_node_status_capacity_pods

kubernetes.node.diskPressure

kube_node_status_condition

  • kube_node_name=<node-address

  • condition=<node-condition>

  • status=<true|false|unknown>

kubernetes.node.memoryPressure

kubernetes.node.networkUnavailable

kubernetes.node.outOfDisk

kubernetes.node.ready

kubernetes.node.unschedulable

kube_node_spec_unschedulable

  • kube_node_name=<node-address>

kube_node_info

  • kube_node_name=<node-address>

kube_node_labels

  • kube_node_name=<node-address>

  • label_NODE_LABEL=<NODE_LABEL>

Deployment

kubernetes.deployment.replicas.available

kube_deployment_status_replicas_available

  • kube_deployment_name=<deployment-name>

  • kube_namespace_name=<deployment-namespace>

kubernetes.deployment.replicas.desired

kube_deployment_spec_replicas

kubernetes.deployment.replicas.paused

kube_deployment_spec_paused

kubernetes.deployment.replicas.running

kube_deployment_status_replicas

kubernetes.deployment.replicas.unavailable

kube_deployment_status_replicas_unavailable

kubernetes.deployment.replicas.updated

kube_deployment_status_replicas_updated

kube_deployment_labels

job

kubernetes.job.completions

kube_job_spec_completions

  • job_name=<job-name>

  • kube_namespace_name=<job-namespace>

kubernetes.job.numFailed

kube_job_failed

kubernetes.job.numSucceeded

kube_job_complete

kubernetes.job.parallelism

kube_job_spec_parallelism

kube_job_status_active

kube_job_info

kube_job_owner

  • job_name=<job-name>

  • kube_namespace_name=<job-namespace>

  • owner_kind=<owner kind>

  • owner_name=<owner name>

kube_job_labels

  • job_name=<job-name>

  • kube_namespace_name=<job-namespace>

  • label_job_label=<job_label>

daemonSet

kubernetes.daemonSet.pods.desired

kube_daemonset_status_desired_number_scheduled

  • daemonset=<daemonset-name>

  • kube_namespace_name=<daemonset-namespace>

kubernetes.daemonSet.pods.misscheduled

kube_daemonset_status_number_misscheduled

kubernetes.daemonSet.pods.ready

kube_daemonset_status_number_ready

kubernetes.daemonSet.pods.scheduled

kube_daemonset_status_current_number_scheduled

kube_daemonset_labels

  • daemonset=<daemonset-name>

  • kube_namespace_name=<daemonset-namespace>

  • label_daemonset_label=<daemonset_label>

replicaSet

kubernetes.replicaSet.replicas.fullyLabeled

kube_replicaset_status_fully_labeled_replicas

  • replicaset=<replicaset-name>

  • kube_namespace_name=<replicaset-namespace>

kubernetes.replicaSet.replicas.ready

kube_replicaset_status_ready_replicas

kubernetes.replicaSet.replicas.running

kube_replicaset_status_replicas

kubernetes.replicaSet.replicas.desired

kube_replicaset_spec_replicas

kube_replicaset_owner

  • replicaset=<replicaset-name>

  • kube_namespace_name=<replicaset-namespace>

  • owner_kind=<owner kind>

  • owner_name=<owner name>

kube_replicaset_labels

  • label_replicaset_label=<replicaset_label>

  • replicaset=<replicaset-name>

  • kube_namespace_name=<replicaset-namespace>

statefulset

kubernetes.statefulset.replicas

kube_statefulset_replicas

  • statefulset=<statefulset-name>

  • kube_namespace_name=<statefulset-namespace>

kubernetes.statefulset.status.replicas

kube_statefulset_status_replicas

kubernetes.statefulset.status.replicas.current

kube_statefulset_status_replicas_current

kubernetes.statefulset.status.replicas.ready

kube_statefulset_status_replicas_ready

kubernetes.statefulset.status.replicas.updated

kube_statefulset_status_replicas_updated

kube_statefulset_labels

hpa

kubernetes.hpa.replicas.min

kube_horizontalpodautoscaler_spec_min_replicas

  • hpa=<hpa-name>

  • kube_namespace_name=<hpa-namespace>

kubernetes.hpa.replicas.max

kube_horizontalpodautoscaler_spec_max_replicas

kubernetes.hpa.replicas.current

kube_horizontalpodautoscaler_status_current_replicas

kubernetes.hpa.replicas.desired

kube_horizontalpodautoscaler_status_desired_replicas

kube_horizontalpodautoscaler_labels

resourcequota

kubernetes.resourcequota.configmaps.hard

kubernetes.resourcequota.configmaps.used

kubernetes.resourcequota.limits.cpu.hard

kubernetes.resourcequota.limits.cpu.used

kubernetes.resourcequota.limits.memory.hard

kubernetes.resourcequota.limits.memory.used

kubernetes.resourcequota.persistentvolumeclaims.hard

kubernetes.resourcequota.persistentvolumeclaims.used

kubernetes.resourcequota.cpu.hard

kubernetes.resourcequota.memory.hard

kubernetes.resourcequota.pods.hard

kubernetes.resourcequota.pods.used

kubernetes.resourcequota.replicationcontrollers.hard

kubernetes.resourcequota.replicationcontrollers.used

kubernetes.resourcequota.requests.cpu.hard

kubernetes.resourcequota.requests.cpu.used

kubernetes.resourcequota.requests.memory.hard

kubernetes.resourcequota.requests.memory.used

kubernetes.resourcequota.requests.storage.hard

kubernetes.resourcequota.requests.storage.used

kubernetes.resourcequota.resourcequotas.hard

kubernetes.resourcequota.resourcequotas.used

kubernetes.resourcequota.secrets.hard

kubernetes.resourcequota.secrets.used

kubernetes.resourcequota.services.hard

kubernetes.resourcequota.services.used

kubernetes.resourcequota.services.loadbalancers.hard

kubernetes.resourcequota.services.loadbalancers.used

kubernetes.resourcequota.services.nodeports.hard

kubernetes.resourcequota.services.nodeports.used

kube_resourcequota

  • resourcequota=<quota-name>

  • kube_namespace_name=<namespace>

  • resource=<ResourceName>

  • type=<quota-type>

namespace

kube_namespace_labels

  • kube_namespace_name=<namespace-name>

  • label_ns_label=<ns_label>

replicationcontroller

kubernetes.replicationcontroller.replicas.desired

kube_replicationcontroller_spec_replicase

  • replicationcontroller=<replicationcontroller-name>

  • kube_namespace_name=<replicationcontroller-namespace>

kubernetes.replicationcontroller.replicas.running

kube_replicationcontroller_status_replicas

kube_replicationcontroller_status_fully_labeled_replicas

kube_replicationcontroller_status_ready_replicas

kube_replicationcontroller_status_available_replicas

kube_replicationcontroller_status_observed_generation

kube_replicationcontroller_metadata_generation

kube_replicationcontroller_created

kube_replicationcontroller_owner

  • replicationcontroller=<replicationcontroller-name>

  • kube_namespace_name=<replicationcontroller-namespace>

  • owner_kind=<owner kind>

  • owner_name=<owner name>

service

kube_service_info

  • service=<service-name>

  • kube_namespace_name=<service-namespace>

  • cluster_ip=<service cluster ip>

  • external_name=<service external name>

  • load_balancer_ip=<service load balancer ip>

kube_service_labels

  • service=<service-name>

  • kube_namespace_name=<service-namespace>

  • label_service_label=<service_label>

persistentvolume

kubernetes.persistentvolume.storage

kube_persistentvolume_capacity_bytes

  • persistentvolume=<pv-name>

kube_persistentvolume_info

  • persistentvolume=<pv-name>

kube_persistentvolume_labels

  • persistentvolume=<pv-name>

  • kube_namespace_name=<label_persistentvolume_label=<persistentvolume_label>

persistentvolumeclaim

kubernetes.persistentvolumeclaim.requests.storage

kube_persistentvolumeclaim_resource_requests_storage_bytes

  • kube_namespace_name=<persistentvolumeclaim-namespace>

  • persistentvolumeclaim=<persistentvolumeclaim-name>

kube_persistentvolumeclaim_info

kube_persistentvolumeclaim_labels

  • persistentvolumeclaim=<persistentvolumeclaim-name>

  • kube_namespace_name=<persistentvolumeclaim-namespace>

  • label_persistentvolumeclaim_label=<persistentvolumeclaim_label>