Global configuration
If you notice a delay between an event and the first notification, read the following blog post => https://pracucci.com/prometheus-understanding-the-delays-on-alerting.html.
Prometheus configuration
AlertManager configuration
Troubleshooting
If the notification takes too much time to be triggered, check the following delays:
scrape_interval = 20s
(prometheus.yml)
evaluation_interval = 20s
(prometheus.yml)
increase(mysql_global_status_slow_queries[1m]) > 0
(alerts/example-mysql.yml)
for: 5m
(alerts/example-mysql.yml)
group_wait = 10s
(alertmanager.yml)
Also read https://pracucci.com/prometheus-understanding-the-delays-on-alerting.html.