Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeprecate attributes module #50

Closed
swsnider opened this issue Feb 24, 2015 · 5 comments
Closed

Undeprecate attributes module #50

swsnider opened this issue Feb 24, 2015 · 5 comments

Comments

@swsnider
Copy link

I'm monitoring a set of aurora clusters. Because of how we move slave between them, the only source of truth for which cluster a given slave belongs to is a puppet configuration run, I need a way to annotate the metrics exposed from node exporter with that info -- it's not part of the metric uri that Prometheus saves for instance.

Is this module actually problematic for technical reasons? If so, is there a better way of doing this?

@brian-brazil
Copy link
Contributor

The textfile module is a better way to do this, and we want to get rid of the config file.

For example you can drop in a file to it with the content:
attributes{myauoracluster="A"} 1

@swsnider
Copy link
Author

That doesn't fo what I described. I want to know what the total used disk space is across nodes in cluster 'a', for instance, so I want the fs metrics to all have a cluster label. Your solution doesn't help with that.

Also, I only have a couple of such labels, so putting them in a flag is fine.

@brian-brazil
Copy link
Contributor

For that you need to configure that as target labels in the prometheus config, no feature of the node exporter can do that for you.

Set labels in the prometheus config to do this, see https://github.com/prometheus/prometheus/blob/master/config/config.proto#L48

@juliusv
Copy link
Member

juliusv commented Feb 24, 2015

Setting custom server-side labels only works for statically configured targets at the moment (that will change when we add more generalized SD support).

What @swsnider suggests would add a separate set of time series that would contain attribute information about this exporter. These could be correlated via and and the instance label with the other time series outputted by the node exporters to select only a certain group of exporters. That might be fine too?

But yeah, there's currently no node exporter feature to just add a label to every time series exported, if that is what you want.

@brian-brazil
Copy link
Contributor

These days we have both all the support needed to do this via the attribute approach, and service discovery in Prometheus would also allow you to do this in few ways including file_sd discovery. Setting target labels on an exporter is an anti-pattern we want to avoid, that concern belongs on the Prometheus server.

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

No branches or pull requests

3 participants