Multiple Kubernetes Node Labels reported as single huge merged tag for `kubernetes.network.rx_bytes` and `kubernetes.network.tx_bytes`
Output of the info page (if this is a bug)
Getting the status from the agent.
==============
Agent (v6.3.0)
==============
Status date: 2019-06-26 12:04:59.406906 UTC
Pid: 338
Python Version: 2.7.14
Logs:
Check Runners: 2
Log Level: INFO
Paths
=====
Config File: /etc/datadog-agent/datadog.yaml
conf.d: /etc/datadog-agent/conf.d
checks.d: /etc/datadog-agent/checks.d
Clocks
======
NTP offset: -0.000646794 s
System UTC time: 2019-06-26 12:04:59.406906 UTC
Host Info
=========
bootTime: 2019-06-25 12:05:26.000000 UTC
kernelVersion: 4.14.127+
os: linux
platform: debian
platformFamily: debian
platformVersion: buster/sid
procs: 68
uptime: 10685
Hostnames
=========
host_aliases: [CONFIDENTIAL]
hostname: [CONFIDENTIAL]
socket-fqdn: datadog-datadog-m5dhm
socket-hostname: datadog-datadog-m5dhm
=========
Collector
=========
Running Checks
==============
cpu
---
Total Runs: 5045
Metric Samples: 6, Total: 30264
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 2ms
disk
----
Total Runs: 5045
Metric Samples: 170, Total: over 100K
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 484ms
docker
------
Total Runs: 5045
Metric Samples: 138, Total: over 100K
Events: 0, Total: 1
Service Checks: 1, Total: 5045
Average Execution Time : 123ms
file_handle
-----------
Total Runs: 5045
Metric Samples: 1, Total: 5045
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 0ms
http_check
----------
Total Runs: 5045
Metric Samples: 4, Total: 20178
Events: 0, Total: 0
Service Checks: 2, Total: 10090
Average Execution Time : 255ms
http_check
----------
Total Runs: 5045
Metric Samples: 4, Total: 20178
Events: 0, Total: 0
Service Checks: 2, Total: 10090
Average Execution Time : 242ms
http_check
----------
Total Runs: 5045
Metric Samples: 4, Total: 20178
Events: 0, Total: 0
Service Checks: 2, Total: 10090
Average Execution Time : 272ms
io
--
Total Runs: 5045
Metric Samples: 182, Total: over 100K
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 6ms
kubelet
-------
Total Runs: 5045
Metric Samples: 116, Total: over 100K
Events: 0, Total: 0
Service Checks: 4, Total: 20180
Average Execution Time : 578ms
kubernetes_apiserver
--------------------
Total Runs: 5045
Metric Samples: 0, Total: 0
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 0ms
load
----
Total Runs: 5045
Metric Samples: 6, Total: 30270
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 0ms
memory
------
Total Runs: 5045
Metric Samples: 16, Total: 80720
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 2ms
network
-------
Total Runs: 5045
Metric Samples: 38, Total: over 100K
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 11ms
ntp
---
Total Runs: 5045
Metric Samples: 1, Total: 5036
Events: 0, Total: 0
Service Checks: 1, Total: 5045
Average Execution Time : 60ms
uptime
------
Total Runs: 5045
Metric Samples: 1, Total: 5045
Events: 0, Total: 0
Service Checks: 0, Total: 0
Average Execution Time : 2ms
========
JMXFetch
========
Initialized checks
==================
no checks
Failed checks
=============
no checks
=========
Forwarder
=========
CheckRunsV1: 5046
DroppedOnInput: 0
IntakeV1: 386
RetryQueueSize: 0
Success: 10478
TimeseriesV1: 5046
API Keys status
===============
https://6-3-0-app.agent.datadoghq.com,[CONFIDENTIAL]: API Key valid
==========
Logs Agent
==========
Logs Agent is not running
=========
DogStatsD
=========
Checks Metric Sample: 3.612066e+06
Event: 2
Events Flushed: 2
Number Of Flushes: 5046
Series Flushed: 2.885373e+06
Service Check: 136215
Service Checks Flushed: 141261
Dogstatsd Metric Sample: 12615
Describe what happened:
I have different node pools in GKE in production. I want to monitor network consumption of each node from those node pools. https://docs.datadoghq.com/integrations/kubernetes/#metrics lists kubernetes.network.rx_bytes and kubernetes.network.tx_bytes, which is exactly what I want to monitor.
I want to create datadog widgets separately for each node pool, and for this purpose i put different labels for each node-pool. E.g.:
apiVersion: v1
kind: Node
metadata:
annotations:
container.googleapis.com/instance_id: "6406839216285605507"
node.alpha.kubernetes.io/ttl: "0"
volumes.kubernetes.io/controller-managed-attach-detach: "true"
creationTimestamp: "2019-06-24T12:03:33Z"
labels:
beta.kubernetes.io/arch: amd64
beta.kubernetes.io/fluentd-ds-ready: "true"
beta.kubernetes.io/instance-type: n1-highcpu-4
beta.kubernetes.io/os: linux
cloud.google.com/gke-nodepool: default-pool
cloud.google.com/gke-os-distribution: cos
cloud.google.com/gke-preemptible: "true"
failure-domain.beta.kubernetes.io/region: europe-west4
failure-domain.beta.kubernetes.io/zone: europe-west4-b
nodepool: default-pool
When i go to the Datadog site, it seems that all the node labels are reported as single tag for each kubernetes.network.rx_bytes and kubernetes.network.tx_bytes, instead of them being added to metrics as individual tags:

This prevents me from configuring Datadog widget for individual labels, attached to GKE Nodes
Describe what you expected:
Datadog agent should report each of the Node Labels as individual tag for kubernetes.network.rx_bytes and kubernetes.network.tx_bytes metrics
Steps to reproduce the issue:
- Setup Kubernetes cluster
- Setup Datadog agent via helm chart 1.31.2 (datadog-cluster-agent enabled)
- Configure Datadog widget on Datadog side to show
kubernetes.network.rx_bytesandkubernetes.network.tx_bytesfor any nodepool from cluster - Try adjust widget to show data only for specific Node Label as tag (e.g. cloud.google.com/gke-nodepool)
Additional environment details (Operating System, Cloud provider, etc): GKE 1.13.6-gke.13 Datadog agent installed via Helm Chart version: 1.31.2
Hi @anton-fedorov, thanks for opening up an issue! First of all, I see that you are using an old version (6.3). Could you upgrade to the latest, the 6.12.2? This version has more features and fixes issues that appeared in between both versions. The change log can be found here: https://github.com/DataDog/datadog-agent/blob/master/CHANGELOG.rst
If you want to extract the node labels as tags, I would suggest to use this env var: DD_KUBERNETES_NODE_LABELS_AS_TAGS in the agent. Doc is here: https://docs.datadoghq.com/agent/autodiscovery/tag/?tab=containerizedagent#extract-node-labels-as-tags
It will let you create individual tags from your node labels easily.
This env var can be set in the helm chart: https://github.com/helm/charts/blob/master/stable/datadog/values.yaml#L198-L204
If this is does not solve the issue, could you open up a ticket with our support team and send a flare from one of your agent? That should let us investigate the issue further.
Thank you,
Simon
Hey @Simwar!
Thanks for your help! Worked like a charm! :+1:
Good to hear! Closing the issue now, thanks for the feedback!