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

Transient, one-off labels? #1696

Closed
atombender opened this Issue Jun 1, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@atombender
Copy link
Contributor

atombender commented Jun 1, 2016

I’d like to generate alerts for PostgreSQL statements that have been running for more than N minutes and are probably stuck due to locking or some I/O issue. The only way to report specific queries would be if the entire SQL statement was a label (e.g. postgres_query_time_total{sql="select * from foo"} 9204881), otherwise an alert would be completely opaque until the developer or person on duty can consult the table of running statements.

Does Prometheus handle this use case well, or is it a bad idea to generate so many transient labels?

@matthiasr

This comment has been minimized.

Copy link
Contributor

matthiasr commented Jun 1, 2016

The MySQL exporter kind of does this based on MySQLs summary tables. It uses a sanitized query as label value, so the set of queries remains bounded.

If you generate a new label for every query with every parameter, Prometheus will blow up very fast.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jun 1, 2016

Prometheus could alert that a query has been running too long, but it's not going to be able to tell you which one. Combining with a logging tool is the best approach.

@lock

This comment has been minimized.

Copy link

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.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.