Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

add hostname metadata #43

Open
strowi opened this issue Jan 28, 2018 · 2 comments
Open

add hostname metadata #43

strowi opened this issue Jan 28, 2018 · 2 comments

Comments

@strowi
Copy link

strowi commented Jan 28, 2018

Hi,

first of all thx for the work you're putting into this! It helped me a lot.;)

Would it be possible to add the nodes 'real' hostname to the available metadata? E.g. for the node-exporter it would be quite useful to export the hostname used in rancher, instead of the IP (just like it is possible in kubernetes).
That way it would be easy to relabel instance to the hostname..

regards,
Roman

@dbsanfte
Copy link

dbsanfte commented Jun 21, 2018

Same problem here. The node instance ID is set by default to the container IP of the exporter, not the hostname of the actual host. It's confusing and weird.

@marcbachmann
Copy link

Same problem here. The node instance ID is set by default to the container IP of the exporter, not the hostname of the actual host. It's confusing and weird.

I had the same issue, I'm now overwriting all the instance labels with the actual hostnames.
This is quite easily doable in the prometheus config by setting it onto the labels attribute:

      - targets: ['rancher-specific-service-name']
        labels:
          instance: 'actual-hostname'

Btw, check that out 😁
https://github.com/marcbachmann/rancher-prometheus-config

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants