-
Notifications
You must be signed in to change notification settings - Fork 243
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
When using clustering, exporters may not work correctly due to instance
label
#1009
Comments
There is a workaround for now: set the
You'd add the above component between your exporters and the prometheus.scrape. Longer term fix can be also achieved via #399. Regardless, we should have good documentation to ensure users don't fall into this pit. |
This issue has not had any activity in the past 30 days, so the |
Affected our 30+ blackbox probes over ~7 alloy deployed via Helm, we were missing out on random targets, triggering DatasourceNoData in our alerting. The workaround fixed it. |
TBH this proposed rule is not a workaround. Using it breaks multiple dashboard and alert since we can't distinguish nodes running node-exporter anymore. |
Omg, it nearly drove me insane, until i found this issue. |
We were hitting this too. Though it did result in some targets not being scraped at all. A hint in the docs would be very helpful. |
Coming into this discussion a bit late. We are consider using Alloy clustering in some areas, and naturally I find this concerning. However, when I set up a simple test against one remote scrape endpoint I wasn't able to reproduce this. This is my simple one scrape endpoint (alloy cluster of two instances):
The metrics do have an |
I think you missunderstood, its only a Problem with Exporters that are setting the instance Label based on the alloy running it. So you cant scrape it directly and have to Go the Extra Route via a discovery relabel between. |
Ah, I see. Thanks for the clarification. |
What's wrong?
Most embedded Prometheus exporters set the
instance
label to the hostname where Alloy runs.This breaks in a subtle, but significant way, the fundamental clustering assumption that all instances have the same configuration. The exporters implicitly inject the hostname as an instance label, but instances usually have different hostnames. This leads to either no scraping of metrics at all, or duplicate scraping with different instance labels (unnecessary).
Steps to reproduce
The issue was discussed in this PR, but decided to move the conversation here for better tracking and to provide a place to refer to for workarounds.
The text was updated successfully, but these errors were encountered: