Question about node exporter (best practices)

1,054 views
Skip to first unread message

victo...@gmail.com

unread,
Nov 1, 2015, 6:31:42 AM11/1/15
to Prometheus Developers
Hello everyone,

first of all, thanks for the hard work on Prometheus, it is an amazing tool :)

I want to use node_exporter to fetch stats from, let's say, hundreds of servers, which belong to several roles, in multiple datacenters.

I would like all the node_exporter metrics to also add some static tags (like role, datacenter, etc). I have been reading through the documentation but the only thing I could find is:

From the textfile collector configuration (https://github.com/prometheus/node_exporter#textfile-collector):

"The textfile collector is similar to the Pushgateway, in that it allows exporting of statistics from batch jobs. It can also be used to export static metrics, such as what role a machine has."

But I think that is not what I want.

I would like to have, for example, in the node_exporter /metrics the following:

# instead of
node_cpu{cpu="cpu0",mode="user"} 466629.32

# have
node_cpu{cpu="cpu0",mode="user",role="app",dc="dc1",env="production"} 466629.32

Could you please share your thoughts on this?

Thank you very much!

Brian Brazil

unread,
Nov 1, 2015, 6:44:06 AM11/1/15
to victo...@gmail.com, Prometheus Developers
For dc and env, you should use target labels with service discovery. See http://prometheus.io/docs/operating/configuration/

For role, it depends on the use. If it never changes across the lifetime of a machine then a target label is fine, otherwise see http://www.robustperception.io/how-to-have-labels-for-machine-roles/

Brian
 

Could you please share your thoughts on this?

Thank you very much!

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Victor Lopez

unread,
Nov 1, 2015, 6:58:35 AM11/1/15
to Brian Brazil, Prometheus Developers
Hi Brian,

thank for for the suggestions, very helpful.

Regards!
Victor.
Reply all
Reply to author
Forward
0 new messages