-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add promql/gauge_staleness
check
#966
Comments
I don't think I follow. Can you give a more concrete example? |
Yes that's a perfect example, exactly the scenario I have in mind. Let me know if this seems like a valid check 😄 |
But there is nothing wrong with |
Both queries are valid, but in my experience the author of A bare
For example, |
A better example might be the exporter pattern of In such a case, an alert for I don't even think that this is specific to gauges. An alert for a Summary metric could be fragile in the same way: Histograms may be different since they should probably fall under the same existing Regardless, I think it would be useful to have a check similar to |
Frequently we make nits to users about using query functions when alerting on gauges:
https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0/
I believe this would be a nice addition to Pint and Prometheus rule linting. Based on the counter check it seems like we could also find if a metric is a gauge and not covered by a query function:
pint/internal/checks/promql_counter.go
Line 51 in 63fb306
I'm happy to contribute this back to Pint but want to discuss with the maintainer if this would be acceptable
cc: @prymitive
The text was updated successfully, but these errors were encountered: