Skip to content

Alerting

Course: Prometheus and Grafana - chapter 16

Grafana provides you with a way to set alerts on metrics.

  1. Enter a name for it - High number of requests
  2. Define query
rate(http_requests_total{route="/user"}[$__rate_interval])
  1. Setup alert threshold (lets say 50 requests/s)
  2. Set evaluation behaviour
  3. How often should we check this alert?
  4. Create folder so that it can be re-used later
  5. Add labels
  6. Team: Backend
  7. Type: Error
  8. Save

Send a lot of requests to the /user endpoint and ensure it triggers the alert

  1. Create a new contact point
  2. Connect the alert to the contact point in Notification policies This will not send a real email unless you’ve put in SMTP credentials while starting the apps