'How to show kubernetes node names instead of AWS hosts in Datadog - EKS integration?

I'm running AWS EKS and trying to integrate it with Datadog.

Kubernetes operates with node names, so

> kubectl get nodes
NAME                                     STATUS   ROLES    AGE   VERSION
ip-x-x-x-x.eu-west-1.compute.internal    Ready    <none>   1d    v1.21.1-eks

But all the metrics in Datadog have AWS instance id in host tag, like host:i-012aa34a56a789a0a

And when I see something in the Datadog, I'd like to find the node in kubernetes cluster and investigate deeper inside the node. For example, to get all the pods in the node

kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=ip-x-x-x-x.eu-west-1.compute.internal

But Datadog gives me only host:i-012aa34a56a789a0a.

Is there a way to convert host:i-012aa34a56a789a0a into ip-x-x-x-x.eu-west-1.compute.internal?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source