

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: Alerting
incomplete
2: Actionable Alerts
incomplete
3: Alert Thresholds
incomplete
This lesson's interactive features are locked, please to keep using them
Logging and dashboards are mostly reactive. You inspect them after something suspicious happens.
Alerting is different: it tells you when a condition is bad right now.
There are many alerting tools out there, but you usually want them tied into your metrics monitoring system – so we'll be using Grafana again!
We'll start with a deliberately noisy alert to prove the full flow works:
query a metric
evaluate a threshold
see the rule transition from Normal to Pending to Firing
Create a noisy alert that fires when the HTTP 401 response rate exceeds 3 requests/minute (calculated over the last 5 minutes).
sum(rate(http_requests_total{status="401"}[5m])) * 60Set the "Evaluation interval" (how often the rule checks the condition) to 10 seconds
Set the "pending period" (the duration the rule has to be in a bad state before it transitions to "firing") to None
The "keep firing for" (the duration the rule will stay in "firing" before it goes back to "normal") should also be None
Run and submit the CLI tests from the root of the Linko repo.
The tests will take around 30 seconds to run because they allow some time for the alert to transition to Firing.