How to get hostname from node-exporter on Kubernetes

282 views
Skip to first unread message

sovr...@gmail.com

unread,
Dec 21, 2017, 1:17:27 AM12/21/17
to Prometheus Users
Hola, I'm using the Helm Chart at https://github.com/kubernetes/charts/tree/master/stable/prometheus for setting up kube-state-metrics and node-exporters and Prometheus on a Kubernetes cluster.

My problem is that kube-state-metrics and everything else in Kubernetes refers to node hostnames. But I'm not sure how to get hostnames into Prometheus. By default Prometheus adds the IP address of the nodes as "instance", but that is not really useful.

How do I add hostname label to metrics scraped from node-exporter? (This has to be automatic ofc, as it's all auto-discovery in Kubernetes).

Thanks!
- Stian
Reply all
Reply to author
Forward
0 new messages