This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

    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=<container-name>

    • pod=<pod-name>

    • namespace=<pod-namespace>

    kubernetes.pod.resourceLimits.cpuCores

    kubernetes.pod.resourceLimits.memBytes

    kube_pod_container_resource_limits

    • resource=<resource-name>

    • unit=<resource-unit>

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • node=< node-name>

    {namespace="default",pod="pod0",container="pod1_con1",resource="cpu",unit="core"}

    {namespace="default",pod="pod0",container="pod1_con1",resource="memory",unit="byte"}

    kubernetes.pod.resourceRequests.cpuCores

    kubernetes.pod.resourceRequests.memBytes

    kube_pod_container_resource_requests

    • resource=<resource-name>

    • unit=<resource-unit>

    • container=<container-name>

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • node=< node-name>

    {namespace="default",pod="pod0",container="pod1_con1",resource="cpu",unit="core"}

    {namespace="default",pod="pod0",container="pod1_con1",resource="memory",unit="byte"}

    kubernetes.pod.status.ready

    kube_pod_status_ready

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • condition=<true|false|unknown>

    kube_pod_info

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • host_ip=<host-ip>

    • pod_ip=<pod-ip>

    • node=<node-name>

    • uid=<pod-uid>

    {namespace="default",pod="pod0",host_ip="1.1.1.1",pod_ip="1.2.3.4",uid="abc-0",node="node1",created_by_kind="<none>",created_by_name="<none>",priority_class=""}

    kube_pod_owner

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • owner_kind=<owner kind>

    • owner_name=<owner name>

    {namespace="default",pod="pod0",owner_kind="<none>",owner_name="<none>;",owner_is_controller="<none>"}

    kube_pod_labels

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • label_POD_LABEL=<POD_LABEL>

    {namespace="default",pod="pod0", label_app="myApp"}

    kube_pod_container_info

    • pod=<pod-name>

    • namespace=<pod-namespace>

    • container_id=<containerid>

    {namespace="default",pod="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

    • node=<node-address>

    • resource=<resource-name>

    • unit=<resource-unit>

    • node=<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{node=""k8s-master"",resource=""hugepages_1Gi"",unit=""byte""} 0
    kube_node_status_capacity{node=""k8s-master"",resource=""hugepages_2Mi"",unit=""byte""} 0
    kube_node_status_capacity{node=""k8s-master"",resource=""memory"",unit=""byte""} 4.16342016e+09
    kube_node_status_capacity{node=""k8s-master"",resource=""pods"",unit=""integer""} 110
    kube_node_status_capacity{node=""k8s-node1"",resource=""pods"",unit=""integer""} 110
    kube_node_status_capacity{node=""k8s-node1"",resource=""cpu"",unit=""core""} 2
    kube_node_status_capacity{node=""k8s-node1"",resource=""hugepages_1Gi"",unit=""byte""} 0
    kube_node_status_capacity{node=""k8s-node1"",resource=""hugepages_2Mi"",unit=""byte""} 0
    kube_node_status_capacity{node=""k8s-node1"",resource=""memory"",unit=""byte""} 6.274154496e+09
    kube_node_status_capacity{node=""k8s-node2"",resource=""hugepages_1Gi"",unit=""byte""} 0
    kube_node_status_capacity{node=""k8s-node2"",resource=""hugepages_2Mi"",unit=""byte""} 0
    kube_node_status_capacity{node=""k8s-node2"",resource=""memory"",unit=""byte""} 6.274154496e+09
    kube_node_status_capacity{node=""k8s-node2"",resource=""pods"",unit=""integer""} 110
    kube_node_status_capacity{node=""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

    • node=<node-address>

    • resource=<resource-name>

    • unit=<resource-unit>

    • node=<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

    • node=<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

    • node=<node-address>

    kube_node_info

    • node=<node-address>

    kube_node_labels

    • node=<node-address>

    • label_NODE_LABEL=<NODE_LABEL>

    Deployment

    kubernetes.deployment.replicas.available

    kube_deployment_status_replicas_available

    • deployment=<deployment-name>

    • namespace=<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>

    • namespace=<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>

    • namespace=<job-namespace>

    • owner_kind=<owner kind>

    • owner_name=<owner name>

    kube_job_labels

    • job_name=<job-name>

    • namespace=<job-namespace>

    • label_job_label=<job_label>

    daemonSet

    kubernetes.daemonSet.pods.desired

    kube_daemonset_status_desired_number_scheduled

    • daemonset=<daemonset-name>

    • namespace=<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>

    • namespace=<daemonset-namespace>

    • label_daemonset_label=<daemonset_label>

    replicaSet

    kubernetes.replicaSet.replicas.fullyLabeled

    kube_replicaset_status_fully_labeled_replicas

    • replicaset=<replicaset-name>

    • namespace=<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>

    • namespace=<replicaset-namespace>

    • owner_kind=<owner kind>

    • owner_name=<owner name>

    kube_replicaset_labels

    • label_replicaset_label=<replicaset_label>

    • replicaset=<replicaset-name>

    • namespace=<replicaset-namespace>

    statefulset

    kubernetes.statefulset.replicas

    kube_statefulset_replicas

    • statefulset=<statefulset-name>

    • namespace=<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>

    • namespace=<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>

    • namespace=<namespace>

    • resource=<ResourceName>

    • type=<quota-type>

    namespace

    kube_namespace_labels

    • namespace=<namespace-name>

    • label_ns_label=<ns_label>

    replicationcontroller

    kubernetes.replicationcontroller.replicas.desired

    kube_replicationcontroller_spec_replicase

    • replicationcontroller=<replicationcontroller-name>

    • namespace=<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>

    • namespace=<replicationcontroller-namespace>

    • owner_kind=<owner kind>

    • owner_name=<owner name>

    service

    kube_service_info

    • service=<service-name>

    • namespace=<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>

    • namespace=<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>

    • namespace=<label_persistentvolume_label=<persistentvolume_label>

    persistentvolumeclaim

    kubernetes.persistentvolumeclaim.requests.storage

    kube_persistentvolumeclaim_resource_requests_storage_bytes

    • namespace=<persistentvolumeclaim-namespace>

    • persistentvolumeclaim=<persistentvolumeclaim-name>

    kube_persistentvolumeclaim_info

    kube_persistentvolumeclaim_labels

    • persistentvolumeclaim=<persistentvolumeclaim-name>

    • namespace=<persistentvolumeclaim-namespace>

    • label_persistentvolumeclaim_label=<persistentvolumeclaim_label>