Back to problems

Write a Script to Monitor 'vmstat' Output

AI Coding · Meta · Medium

Problem You are handed a partly-built monitoring agent. It follows the output of vmstat, evaluates each reading against thresholds the operator configured, and pages when a metric crosses a limit. It is meant to stay up for weeks on a fleet machine. Right now it does not work. The parser mislabels columns, the threshold rules read their own configuration backwards, the loop that joins them was never written, and the piece that decides whether a breach is a real trend or a…

Checking your access…