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
Copy file name to clipboardExpand all lines: docs/using.md
+41-26Lines changed: 41 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,32 +204,6 @@ Label(appears as the display name of the variable selected).
204
204
Custom variables provide the convenience of using custom intervals for your dashboard. Please note the accepted format for intervals are within squared brackets and must include the time unit (for example [5m] to specify 5 minutes or [2h] for two hours). Following is an example of interval template variable definition:
205
205

206
206
207
-
208
-
### Windows and Resolution
209
-
210
-
For windows and resolution, you can use a custom or constant variable. To create a custom, select the variable type as custom.
211
-
Label(appears as the display name of the variable selected)
212
-
213
-
Custom variables provide the convenience of selecting a value out of many values. Try replicating the data in the following screenshots for window and resolution.
214
-
215
-
Custom window variable
216
-

217
-
218
-
219
-
Custom resolution variable
220
-

221
-
222
-
Choose the save button to save your dashboard! DO NOT FORGET
223
-
224
-
225
-
226
-
Now, on the top of the panel, you would see windowLabel and resolutionLabel
227
-
You can select the value for the variables from here and use them in
228
-
the dropdowns window and resolution below the panel
In case the plugin is configured to operate with multitenancy support, please make sure you are selecting **region** before **tenancy** and all the other dropdowns.
233
207
234
208
235
209
### Dimensions
@@ -345,3 +319,44 @@ If the user selects a time range
345
319
2. Less than or equal to 30 days and more than 7 days -> window will be 5m and resolution will be 5 min.
346
320
3. More than 30 days -> a window will be 1h and resolution will be 1 h
347
321
322
+
## Alerting
323
+
Version 5.5 of the metrics plugin introduces the Alerting capability.
324
+
For detailed instruction how to work with alerts in Grafana, you may reference to the official documentation available at [Grafana Alerting](https://grafana.com/docs/grafana/latest/alerting/) web page.
325
+
326
+
The overall procedure is like the following (in Grafana 10):
327
+
1. Open the dashboard you created earlier
328
+
2. Edit any existing panel.
329
+
3. Click on the Alert tab underneath the panel.
330
+
4. Click on Create alert rule from this panel button.
331
+
5. In Expressions section, in the Threshold expression C, set the threshold
332
+
6. Click on Set as alert condition on Threshold expression C. Your alert should now look as follows:
Expression section showing B "reduce" with Input: A, Function: Last, Mode: Strict, C Threshold with Input: B, Is Above: 15 and Alert Condition enabled indicator
335
+
Expression section showing B "reduce" with Input: A, Function: Last, Mode: Strict, C Threshold with Input: B, Is Above: 15 and Alert Condition enabled indicator
336
+
7. In Set alert evaluation behavior section, click on New folder button and create a new folder to store an evaluation rule.
337
+
8. Then, click on New evaluation group button and create a new evaluation group; choose a name and set the Evaluation interval.
338
+
9. Click Save rule and exit button.
339
+
10. Save the dashboard.
340
+
341
+
After some time the alert rule evaluates and transitions into Alerting state.
342
+
343
+
### Known limitations with Alerts
344
+
#### Custom Label is incompatible with alert definition
345
+
Please note that Alerting is **not** compatible with custom label function. That means you must remove any custom label in the alert definition window, if any. custom labels can stay in the panels and dashboards, must be removed only in alert definition window.
346
+
If you try to set up an alert with some custom label, you will see this error:
Therefore, if you have a panel which is using custom label, you will see an entry like this one when setting alert:
350
+

351
+
352
+
Make sure to modify this alert setup removing the Legend Format entry like the following:
353
+

354
+
355
+
You do not need to remove Custom Label in the Panel. Only in the alert definition you must remove it.
356
+
357
+
#### Alerts and AUTO interval setting
358
+
If you are setting up an alert from a panel which uses Auto Interval, this interval will always revert to 1 minute ([1m]). Auto intervals based on Time Range are not supported in alert setting.
359
+
360
+
#### Alerts and Template vars
361
+
Template variables are not supported in alerts. If you are setting up an alert from a panel which uses template vars, the alert will take the last chosen values.
362
+
Alert setting from panels which are using template variables in raw mode in is not supported. In that case you must rewrite your MQL statement when defyning the alert using explicit expressions without template vars.
0 commit comments