Alerting: Add Troubleshooting to Images in notifications docs (#58955)

This commit is contained in:
George Robinson 2022-11-21 11:21:59 +00:00 committed by GitHub
parent 4d1504d160
commit 2f878acd9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ If Grafana has been set up to use an external image store, `upload_external_imag
# will be persisted to disk for up to temp_data_lifetime.
upload_external_image_storage = false
Restart Grafana for the changes to take affect.
Restart Grafana for the changes to take effect.
## Supported notifiers
@ -101,3 +101,14 @@ For example, if a screenshot could not be taken within the expected time (10 sec
- Images in notifications are not available for Grafana Mimir and Loki managed alert rules, or when Grafana is set up to send alert notifications to an external Alertmanager.
- When alerts generated by different alert rules are sent in a single notification, there may be screenshots for each alert rule. This happens if an alert group contains multiple alerting rules. The order the images are attached is random. If you need to guarantee the ordering of images, make sure that your alert groups contain a single alerting rule.
- Some contact points only handle a single image. In this case, the first image associated with an alert will be attached. Because the ordering is random, this may not always be an image for the same alert rule. If you need to guarantee you receive a screenshot for a particular rule, make sure that your alert groups contain a single alerting rule.
## Troubleshooting
If Grafana has been set up to send images in notifications, however notifications are still being received without images, then check the troubleshooting instructions below.
1. Check that Grafana has been set up as per the instructions
2. Check that the notifier supports images in notifications as per the table of supported notifiers
3. Enable debug logging in Grafana and look for logs with the logger `ngalert.image`
4. If the alert is not associated with a dashboard there will be logs for `Cannot take screenshot for alert rule as it is not associated with a dashboard`
5. If the alert is associated with a dashboard, but no panel in the dashboard, there will be logs for `Cannot take screenshot for alert rule as it is not associated with a panel`
6. If images cannot be taken because of mis-configuration or an issue with image rendering there will be logs for `Failed to take an image` including the Dashboard UID, Panel ID, and the error message