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 upfeature request: timeseries blacklist/whitelist for collection #602
Comments
This comment has been minimized.
This comment has been minimized.
|
@stapelberg Yes, adding a blacklist/whitelist filter is definitely planned, and @brian-brazil has advocated for it as well. Out of curiosity, what are you using to ingest those metrics? Just wondering how the chain of Raft-metric->RobustIRC->(some kind of exporter or native instrumentation?)->Prometheus looks. |
This comment has been minimized.
This comment has been minimized.
|
RobustIRC uses Prometheus directly, so I just configured the /metrics endpoint of each node in my Prometheus instance :). |
This comment has been minimized.
This comment has been minimized.
|
@stapelberg Ha! Excellent :) Of course that'd give you the power to rewrite the raft metrics directly when exporting them as Prometheus metrics? But yes, we definitely want filtering support soon. It depends a bit on a larger refactor we're planning to do in the next months to the whole scraping / job configuration / SD layer though. |
This comment has been minimized.
This comment has been minimized.
I'm a little confused where are the hostnames coming from then? I don't see them in the RobustIRC source. |
This comment has been minimized.
This comment has been minimized.
RobustIRC also uses hashicorp/raft, which uses Prometheus via the Prometheus sink in armon/go-metrics — that’s where the hostname comes from. |
This comment has been minimized.
This comment has been minimized.
|
@stapelberg Oh, thanks for adding Prometheus to go-metrics! That's awesome. |
This comment has been minimized.
This comment has been minimized.
|
See #803 |
This comment has been minimized.
This comment has been minimized.
brian-brazil
closed this
Jun 17, 2015
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil So, I’ve tried using this feature; here’s my prometheus configuration:
However, I still see new raftmetrics_ timeseries cropping up, most recently What am I doing wrong here? Shall I open a new issue for this problem? |
This comment has been minimized.
This comment has been minimized.
|
This is a consequence of us anchoring all the relabelling and selection regular expressions. Add a |
This comment has been minimized.
This comment has been minimized.
|
Ah. Does that also mean the Also, can we update the docs to reflect that? |
This comment has been minimized.
This comment has been minimized.
|
Would it make sense for the anchoring to check whether the provided regex is already anchored? |
This comment has been minimized.
This comment has been minimized.
|
This was documented in prometheus/docs#213 Extra anchoring is harmless, and trying to do magic and guess what the user wants is likely to cause more problems than it solves. |
This comment has been minimized.
This comment has been minimized.
|
Fair comment. |
simonpasquier
pushed a commit
to simonpasquier/prometheus
that referenced
this issue
Oct 12, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 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. |
stapelberg commentedMar 18, 2015
When running http://robustirc.net/ in a docker container, the raft package RobustIRC is using (https://github.com/hashicorp/raft) puts the hostname into the metric, and Docker generates hostnames at random. This is a bit unfortunate and I know that for prometheus, the hostname should be a label, but I don’t see a good way to fix this upstream since hashicorp/raft wants to not tie itself to a specific monitoring system.
The downside of this is that everytime I restart my docker containers, I get new timeseries in prometheus, which (for example) makes auto-completion slow and barely usable.
Now, for mitigating this issue, an ideal solution would be to use relabeling to remove the hostname from the metric, but that’s a rather advanced feature.
Instead, since I actually don’t care about the metrics in question, a simpler fix would be to add a blacklist (and/or whitelist) mechanism to prometheus. I.e., for a given target, I’d want to be able to say please ignore all metrics matching
/^raftmetrics_[0-9a-f]+_/.I suspect that situations requiring a filter will become more common as more and more people adopt prometheus in one way or another.
What do you think?