# Alerting

> A rule that tells you when a number goes past a set line.

**Field:** Infrastructure  
**Category:** Monitoring & Observability  
**Also known as:** Alert, Monitoring Alert, Alert Rule, Alertmanager

## Think of it like

It is like a smoke alarm. It stays quiet until there is smoke, then it is loud.

## Definition

Alerting means sending a message to a person when something needs them. An alert rule watches a number and a limit, like errors above 5% for ten minutes. When the rule fires, it sends a message to chat, email or a phone. A good alert is rare, urgent and tells you what to do. The wait time stops one short blip from waking anyone.

## Example

Lucy's rule fires when the site has not answered for five minutes. At 3 a.m. it pages the engineer on call, who restarts the stuck server.

## Example code

```yaml
groups:
- name: shop
  rules:
  - alert: SiteDown
    expr: up{job="shop"} == 0
    for: 5m
```

A rule that fires when the shop has not answered for five minutes in a row.

## Why it matters

Alerts are how a problem reaches a human in time. Too few and you miss it, too many and nobody reads them.

## Common mistake

Alerting on causes, like high CPU, instead of on what users feel. Alert on slow pages and errors first.

## Three principles

- **Rare and urgent.** Every alert should need a person now.
- **Wait a little.** A short delay filters out blips.
- **Say what to do.** Link the alert to the next step.

## Related terms

- [Monitoring](https://learn.benibix.com/term/infrastructure/monitoring)
- [Metric (Monitoring)](https://learn.benibix.com/term/infrastructure/metric)
- [Prometheus](https://learn.benibix.com/term/infrastructure/prometheus)
- [Uptime Monitoring](https://learn.benibix.com/term/infrastructure/uptime-monitoring)
- [Alert Banner](https://learn.benibix.com/term/design/alert-banner)
- [On-Call](https://learn.benibix.com/term/infrastructure/on-call)
- [Alert Fatigue](https://learn.benibix.com/term/infrastructure/alert-fatigue)

![A loop from left to right. An app gives off numbers. A collector gathers them every few seconds and stores them. From the store, one arrow goes up to a dashboard of charts that people look at. Another arrow goes down to an alert rule, which sends a message to the person on call when a line crosses its limit.](https://learn.benibix.com/diagrams/inf-monitoring-loop.svg)

---

Source: https://learn.benibix.com/term/infrastructure/alerting
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
