Creating dashboard thresholds in 2.14

https://grafana.com/docs/grafana/latest/alerting/create-alerts/

I’m confused. The above talks about clicking on the title of a dashboard, then edit. I’m logged in as admin and there’s no such thing as an alert tab that seems to appear.

What might I be doing wrong?

Perhaps you can’t edit/add alerts to the default dashboards? You must create your own new dashboard, then you can add threshold alerts to that?

1 Like

Hi @marcoshaw

It’s possible to add an alert to existed elements. But Grafana has a limitation regarding template variables.

The query used in an alert rule cannot contain any template variables.

Variables are used in all formulas. So you should rewrite formulas in order to remove variables.
After such changes you would be able to create an alert rule.

e.g.
Original formula is Query A and modified one is Query D

1 Like

One of these days I’m going to beat @Vadim_Yalovets to an answer…but he’s once again nailed it! The other issue with the native alerting is that it’s coupled to that graph/chart which is rarely what people are after…more often than not, you want to know when “any production mysql queries per second crosses X” which is why we added integrated alerting as of 2.13.0 which is in tech preview. It’s Alertmanager based but allows for more “recipe” driven alerting and so far integrates nicely with email/slack/pagerDuty with more options on the horizon. Just another option as I find the duplicating of templated dashboards and limited scope of the alert to be cumbersome.

2 Likes

Hi @marcoshaw - by default PMM ships with the dashboards in a non-editable state, that’s why even when logged in as admin you don’t see the Edit option above each graph element.
What you need to do is click the gear icon in the top right of the Dashboard you want to make changes against:
image
In the settings window that opens, click the blue box labelled Make Editable
image
Once you return to the dashboard you just set Editable (either the big arrow top left or by choosing to “save” the dashboard state), you’ll notice some new icons at the top, particularly the floppy disk. This is a hint that your dashboard is now in an Editable state.
image
Now by clicking on any graph panel you’ll see the Edit option available, and you can then go ahead to add your Grafana Alert, or make any other changes to the dashboard:
image
Remember to save your changes before navigating away from the page - but keep in mind if you’re editing a Percona-supplied dashboard (any of the default ones that ship with PMM Server), make a copy before you edit, otherwise next time you bump to the subsequent version, our upgrade routine will reset your dashboard to defaults.

2 Likes