You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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!
Beta Was this translation helpful? Give feedback.
All reactions