Interview Prep/Monitoring & Observability/Alerting and On-Call Design

Prevent a disk-full outage on a log server before it happens.

IntermediateScenarioAlerting and On-Call Design
Answer

Situation read → A static "disk above 90%" alert gives too little time on fast-growing disks and too much noise on slow ones. Use rate-of-change.

What I'd do →

  1. Use predict_linear to ask "will this fill within 4 hours?".
- alert: DiskWillFillIn4h
  expr: |
    predict_linear(node_filesystem_avail_bytes{fstype!~"tmpfs|overlay"}[1h], 4*3600) < 0
    and node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.4
  for: 15m
  labels: {severity: page}
  1. Add a 24-hour prediction at warning severity (ticket).
  2. Add a static 85% warning as a backstop.

Why → Time-to-full is what matters operationally. The second condition avoids paging on large, mostly-empty disks.

Interview tip → Mention inodes (node_filesystem_files_free) as the other way disks "fill".

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting and On-Call Design