Linux Labs

Observability: metrics, alerts, logs / Stage 2 of 9

PromQL: rate, sum and comparison

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 6 · summary · 2 min

Summary

  • A counter is a total since start; the load “right now” is shown by rate(…[1m]), the total over a window by increase.
  • A selector in curly braces picks series by labels, sum by adds them up and keeps the labels you need.
  • a / b divides series with the same labels; a > threshold comparison keeps only the series above the threshold.
  • How much traffic the machine receives right now is rate(node_network_receive_bytes_total[1m]): about 200,000 bytes per second while the counter is in the hundreds of megabytes.
Ubuntu 24.04
Loading…