The <IdentifierMappings> section contains the details of the label names for various resources of VMware Aria Operations containing the service identifier as its value. To map a metric to any Kubernetes object in VMware Aria Operations, the metric should contain the service identifier in one of its label values. In that case, the specific label name can be added against the respective service configuration. The following sections explain each of the mappings in detail.
<NodeIdentifierMapping>
The <NodeIdentifierMapping> section contains the list of label names which holds Node Name information as its value. The attribute labelContainingNodeName contains a comma separated list of label names. The VMware Aria Operations Management Pack for Kubernetes uses this label name to filter and map the Prometheus metrics for a particular node.
node_context_switches_total{instance="10.244.0.34:9100", job="node-exporter", node_name="k8s-master"}
<NodeIdentifierMapping>
would be as follows:
<NodeIdentifierMapping labelContainingNodeName="node_name" />
<NamespaceIdentifierMapping>
The <NamespaceIdentifierMapping> section contains the list of label names which holds Namespace Name information as its value. The attribute labelContainingNamespaceName contains a comma separated list of label names. The management pack uses this label name to filter Prometheus metrics for a specific namespace.
kube_namespace_status_phase{instance="kube-state-metrics.monitoring.svc.cluster.local:8080", job="kube-state-metrics", namespace="kube-system", phase="Active"}
<NamespaceIdentifierMapping>
would be as follows:
<NamespaceIdentifierMapping labelContainingNamespaceName="namespace" />
<PodIdentifierMapping>
The <PodIdentifierMapping> section contains the list of label names which holds Pod Name information as its value. The attribute labelContainingPodName contains a comma separated list of label names. The management pack uses this label name to filter Prometheus metrics for a specific pod.
For example, consider a metric with the following labels:
kubernetes_pod_network_rx_bytes{instance="10.187.155.179:32244", job="telegraf-exporter", namespace="kube-system", node_name="worker01", pod_name="cadvisor-fv4j4"}
<PodIdentifierMapping>
would be as follows:
<PodIdentifierMapping labelContainingPodName="pod_name" />
<ContainerIdentifierMapping>
The <ContainerIdentifierMapping> section contains the list of label names which holds Container Name or ID information as its value. The attributes labelContainingContainerName and labelContainingContainerID contain a comma separated list of label names for container names or IDs respectively. The management pack uses this label name to filter Prometheus metrics for a specific container either by name or ID.
kubernetes_pod_container_cpu_usage_core_nanoseconds{container_name="cadvisor", instance="10.187.155.179:32244", job="telegraf-exporter", namespace="kube-system", node_name="worker01", pod_name="cadvisor-fv4j4"}
<ContainerIdentifierMapping>
would be as follows:
<ContainerIdentifierMapping labelContaingContainerID="id" labelContainingContainerName="container_name" />
kube_pod_container_info{container="vrops-kube-monitor", container_id="docker://018f520b78bd42e81590741a7b1a224a8de06c4ce8c1f815b62f28bf91b43a95", image="vrops-k8s-monitor:latest", image_id="docker://sha256:12e1cbfd882c85094e76582b0ab9ad1446351406b394101c3aac3760c521b219", image_spec="vrops-k8s-monitor:latest", instance="kube-state-metrics.monitoring.svc.cluster.local:8080", job="kube-state-metrics", namespace="default", pod="vrops-kube-monitor-dep-5d65c574cc-6hdm8", uid="4b4a68b7-ca82-40d0-b04c-311ae720737f"}
<ContainerIdentifierMapping>
would be as follows:
<ContainerIdentifierMapping labelContaingContainerID="container_id" labelContainingContainerName="container_name" />
<DeploymentIdentifierMapping>
The <DeploymentIdentifierMapping> section contains the list of label names which holds Deployment Name information as its value. The attribute labelContainingDeploymentName contains a comma separated list of label names. The management pack uses this label name to filter Prometheus metrics for a specific deployment.
kube_deployment_spec_replicas{deployment="kube-state-metrics", instance="kube-state-metrics.monitoring.svc.cluster.local:8080", job="kube-state-metrics", namespace="kube-system"}
<DeploymentIdentifierMapping>
would be as follows:
<DeploymentIdentifierMapping labelContainingDeploymentName="deployment" />
<ReplicasetIdentifierMapping>
The <ReplicasetIdentifierMapping> section contains the list of label names which holds ReplicaSet Name information as its value. The attribute labelContainingReplicasetName contains a comma separated list of label names. The management pack uses this label name to filter Prometheus metrics for a specific ReplicaSet.
kube_replicaset_spec_replicas{instance="kube-state-metrics.monitoring.svc.cluster.local:8080", job="kube-state-metrics", namespace="kube-system", replicaset="kube-state-metrics-6687f6dcff"}
<ReplicasetIdentifierMapping labelContainingReplicasetName="replicaset" />