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

How to find the metrics that are NOT matched by the rules #239

Open
altmind opened this issue Aug 8, 2023 · 2 comments
Open

How to find the metrics that are NOT matched by the rules #239

altmind opened this issue Aug 8, 2023 · 2 comments

Comments

@altmind
Copy link

altmind commented Aug 8, 2023

For graphite exporter mappings i see there's a special action: "drop" for a catch-all rule that can discard the incoming that dont match.

---

- match: "."
  match_type: regex
  action: drop
  name: "delete"

I wonder if there's a way to have a catch-all rule that saves the received metric to a file or to the stdout, so i can add track/add the unmatched metrics? I checked the statsd_exporter github and was unable to find all the possible actions there, maybe you know?

@matthiasr
Copy link
Contributor

At the moment, there is no such feature. You can get some insight by enabling debug logging, which logs all incoming events. However, this can be very high volume.

I think this is a good idea, but we need to be careful about the log volume. We should probably only log each metric once. This leaves open what should happen with metrics that come with their own tagging; I guess since we only allow matching on metric names, we would still only need to log once per metric name without loss in visibility? What would the path forward be for someone who receives and drops very bad metrics with unbounded cardinality, i.e. a different name each time?

@matthiasr
Copy link
Contributor

Implementation wise, since we re-use the statsd exporter mapping code here, the change would have to happen over there.

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

No branches or pull requests

2 participants