I want to create an alert based on queries taking over x seconds.
I’ve created alerts in my own custom Alertmanager in the past by clicking on “Explore” on a specific dashboard in the PMM Grafana instance to pull the metric name I want to use for the promql needed to make the alert. However, when opening the Query Analyitics page in PMM, it doesn’t seem to use the same data stream as the Prometheus metrics? Is there any other way to do this?
Not as of yet but it will come in time (again, I’m talking about integrated alerting vs the native grafana alerts) but I believe the order of implementation will be from grafana panels first and QAN second BUT I will send this over to our PO to take as input on where the bigger value to the user will be.
In the mean time if there’s a particular component of QAN that you want to alert on just paste it here as we have a few PromQL wizards that can probably help craft the query to base the alert on.
Thanks for the info. We basically have this alert setup as a bash script (select * from information_schema.processlist where time >3600;), but wanted to eliminate the need to have an outside computer do a login and query, since that info may already be contained in PMM.
Is this feature made available in recent versions ? we are also intrested if we see a sudden increase in the avg query responsetime compared to the past.