Set the alert condition

You’ll set the rule that decides when your alert fires: which comparison to make, and what value to compare against.

Your query counts QuickPizza’s 5xx errors in the last 5 minutes. In this milestone, you tell Grafana to fire the moment that count goes above zero, then preview the result.

  1. Notice the Alert condition section. This is where you tell Grafana when to fire the alert.

  2. Is above is already selected. Leave it — any 5xx error in the last 5 minutes puts your query result above zero, which fires the alert.

  1. Click Preview alert rule condition to test the value against your query.

    The preview shows a normal state while QuickPizza is healthy and a firing state as soon as any 5xx error appears in the 5-minute window.

  2. Your alert condition is set. Next, you organize the rule with labels and control how often Grafana evaluates it.


page 6 of 12