Alerting
Course: Prometheus and Grafana - chapter 16
Grafana provides you with a way to set alerts on metrics.

- Enter a name for it - High number of requests
- Define query
rate(http_requests_total{route="/user"}[$__rate_interval])- Setup alert threshold (lets say 50 requests/s)
- Set evaluation behaviour
- How often should we check this alert?
- Create folder so that it can be re-used later
- Add labels
- Team: Backend
- Type: Error
- Save
Testing
Section titled “Testing”Send a lot of requests to the /user endpoint and ensure it triggers the alert
Notifying
Section titled “Notifying”- Create a new contact point
- Connect the alert to the contact point in
Notification policiesThis will not send a real email unless you’ve put in SMTP credentials while starting the apps