This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi!
Here is the progs snippet I would like to discuss.
The counter keep counting as long as the "nb" is in the log lines. Once the "nb" is deleted and no more log lines are generated for that "nb" the counter keeps reporting the last value indefinitely unless mtail process gets restarted from which point the counter for the particular "nb" is gone. Looks like a waste of resources.
I added "del foo_fail_state[$nb] after 1h" line hoping that the counter for the deleted "nb" would disappear from the reports (Prometheus scrapes the mail metrics) after 1 hour of inactivity/value change.
Is there a way around this? How do I stop reporting a metric for a key that does not exist anymore?
Much appreciated!
All reactions