Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upFederating: any way of disabling smartness of adding instance/job entirely? #2329
Comments
This comment has been minimized.
This comment has been minimized.
|
Honor_labels should be sufficient here to take care of the instance label, if not it's a bug in the federation endpoint. There should always be a job label though, you should ensure your aggregations are preserving it. |
This comment has been minimized.
This comment has been minimized.
|
The problem with
When pulled in through federation, it suddenly has an To reply to your final remark: why should there always be a job label? What if I'm simply interested in summing up all metrics of a given name, regardless of the name of the job? It shouldn't be Prometheus' business to care about that. Prometheus would have been more functional if there was a config option |
This comment has been minimized.
This comment has been minimized.
So you can distinguish metrics from different jobs.
This doesn't come up too often, but I've seen a job label such as "cluster" used in this case.
This is what honor_labels is intended for. |
This comment has been minimized.
This comment has been minimized.
|
This is #2488 |
brian-brazil
closed this
Mar 27, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
EdSchouten commentedJan 9, 2017
•
edited
We want to configure a set of Prometheus instances to federate for multiple purposes:
What we've observed is that Prometheus doesn't seem to provide an easy way of scraping another Prometheus instance and leaving all of the labels in its original form. It always tries to add 'instance' and 'job'. The 'honor_labels' flag doesn't help here entirely, as it only determines how to deal with conflicts -- not when one of those labels was absent on the original dataset. We have some aggregated rules that don't have job/instance set, meaning these labels still get added when federating. Right now we're working around by adding this:
Unfortunately, this approach has the downside of also partially messing up built-in metrics like
up,scrape_duration_seconds, etc.My question is, are there any plans on improving this in future versions of Prometheus? Are there any proposals for the desired way of doing this? Is there any way we can help out?