Synthetic Monitoring alerting
Synthetic monitoring integrates with Grafana Cloud alerting via Alertmanager to provide alerts. The synthetic monitoring plugin provides some default alerting rules. These rules evaluate metrics published by the probes into your cloud Prometheus instance. Firing alert rules can be routed to notification receivers configured in Grafana Cloud alerting.
The default alerting rules that we provide are:
- HighSensitivity: If 5% of probes fail for 5 minutes, then fire an alert [via the routing that you have set up]
- MedSensitivity: If 10% of probes fail for 5 minutes, then fire an alert [via the routing that you have set up]
- LowSensitivity: If 25% of probes fail for 5 minutes, then fire an alert [via the routing that you have set up]
How to create an alert for a Synthetic Monitoring checks
Alerts can be created as part of creating or editing a check. You must be logged in to a Grafana Cloud instance in order to create or edit alerts. Alerting in Synthetic Monitoring happens in two phases: configuring a check to publish an alert sensitivity metric label value, and configuring alert rules.
To configure a check to publish the alert sensitivity metric label value:
- Navigate to the checks page of the Synthetic Monitoring plugin.
- Click on New Check to create a new check, or on a preexisting check in the list.
- Click on the Alerting section to show the alerting fields. Select a sensitivity level to associate with the check and click Save. This sensitivity value will be published to the
alert_sensitivitylabel on the
sm_check_infometric each time the check runs on a probe. That label value will be utilized by the default alerts to scope which checks to fire alerts for.
To configure alert rules:
- Navigate to the alerts page of Synthetic Monitoring.
- If you have no default rules set up already for Synthetic Monitoring, click the Populate default alerts button.
- Some default rules will be generated for you. These rules represent sensitivity “buckets” based on probe success percentage. Checks that have been marked with a sensitivity level and have a success percentage drop below the threshold will cause the rule to fire. Checks that have a sensitivity level of “none” will not cause any of the default rules to fire.
How to edit an alert for a checks
Alerts can be edited in Synthetic Monitoring on the alerts page, or in the Cloud Alerting UI
NOTE: It’s possible that substantially editing an alert rule in the Cloud Alerting UI will cause it to no longer be editable in the Synthetic Monitoring UI. In that case, the alert rule will only be editable from Grafana Cloud alerting. For example, if you edit the value “0.9” to be “0.75,” this change will propagate back to the synthetic monitoring alerts tab, and the alert will fire according to your edit. However, if you edit the value “0.9” to be “steve”, the alert will be invalid and no longer editable in the UI in the synthetic monitoring alerts tab.
How to set up routing for default alerts
Default alerts contain only the alert rules. Without setting up routing, these alerts will not be fired. You must set up routing in Alertmanager within Grafana Cloud alerting.
Feel free to write your own configuration for routing in the text box editor. You may set up routing to places such as email addresses, Slack, PagerDuty, OpsGenie, and so on. Step by step instructions can be found in this blog post. In order to route the default synthetic monitoring alerts to a notification receiver, you can set up the conditions to match on the
route: receiver: <your notification receiver> match: namespace: synthetic_monitoring alert_sensitivity: high
If you do not already have an SMTP server available for sending email alerts, see Grafana Cloud alerting for information about how to use one supplied by Grafana Labs.
Where to access Synthetic Monitoring alerts from Grafana Cloud alerting
Alert rules can be found in the
synthetic_monitoring namespace of Grafana Cloud alerting. Default rules will be created inside the
default rule group.
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.