rate(http_requests_total[5m]), what does it return?rate(http_requests_total[5m])The rate() function calculates the per-second average rate of increase of a counter over the specified time window, here 5 minutes.
IF cpu_usage > 90% FOR 10m THEN alert. Which option best describes when PagerDuty will be notified?The 'FOR 10m' means the condition must be true continuously for 10 minutes before triggering the alert and notification.
memory_usage[5m] > 80. The alert never fires even when memory usage is high. What is the likely cause?memory_usage[5m] > 80
memory_usage[5m] returns a range vector, but alert conditions require instant vectors for comparison to scalars.
First, metrics must be exposed by the service (1), then the monitoring system must collect them (4), then alert rules are defined (2), and finally notifications are set up (3).
Using an alert 'for' duration means the condition must be true continuously for a set time, reducing noise from brief spikes.
