Quiz Entry - updated: 2026.10.01
Prometheus treats every piece of information as a metric. How would you rebuild a Nagios check "alert if / is mounted read-only"?
Let an exporter count the file systems mounted read-only and alert when that number exceeds a threshold (here: greater than 0).
A Nagios check is a yes/no test that runs on the host. Prometheus has no checks; it only has numbers that change over time. So every condition has to be rephrased as a measurement plus a rule:
- Measure: the Node Exporter already exposes
node_filesystem_readonly(1 if read-only, 0 otherwise) per mount point. - Rule: an alert rule such as
node_filesystem_readonly{mountpoint="/"} == 1, orsum(node_filesystem_readonly) > 0for any mount.
This "rethinking in metrics" is the main adjustment for admins coming from Nagios. The upside is that the same number that drives the alert can also be graphed and trended.
Go deeper:
prometheus/node_exporter on GitHub โ the collectors list, including filesystem metrics such as node_filesystem_readonly.