Fractal Techware

Alert runbooks /

NodeFilesystemSpaceFillingUp

Filesystem is predicted to run out of space within 24 hours. Free rule (MIT): the complete runbook and rule definition are below.

   
Severity critical, warning
Pending (for:) 1h (warning), 1h (critical)
Domain Hosts (node_exporter)
Requires node_exporter 1.x (default collectors; systemd and hwmon noted per alert)
Rule file rules/node-exporter.rules.yml (group ftw.node-exporter.alerts)

Meaning

Free space is below the threshold AND a linear prediction over the last 6 hours says the filesystem will be full within the prediction horizon (24h for warning, 4h for critical).

Impact

When the filesystem is full, writes fail - databases crash or go read-only, logs are lost, container images cannot be pulled.

Diagnosis

Mitigation

Escalation

Owned by whoever operates the host (platform team for Kubernetes nodes, service owner for standalone VMs).

Rule definition

From rules/node-exporter.rules.yml in the free repository (MIT). Unit tests for it are in tests/.

- alert: NodeFilesystemSpaceFillingUp
  expr: |-
    (
      node_filesystem_avail_bytes{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"} / node_filesystem_size_bytes{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"} * 100 < 15
    and
      predict_linear(node_filesystem_avail_bytes{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"}[6h], 24 * 3600) < 0
    and
      node_filesystem_readonly{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"} == 0
    )
  for: 1h
  labels:
    severity: warning
  annotations:
    summary: Filesystem is predicted to run out of space within 24 hours.
    description: Filesystem {{ $labels.mountpoint }} ({{ $labels.device }}) on {{ $labels.instance }} has {{ $value | printf "%.1f" }}% free and, at the current rate, fills up within 24 hours.
    runbook_url: runbooks/node-exporter/NodeFilesystemSpaceFillingUp.md
- alert: NodeFilesystemSpaceFillingUp
  expr: |-
    (
      node_filesystem_avail_bytes{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"} / node_filesystem_size_bytes{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"} * 100 < 10
    and
      predict_linear(node_filesystem_avail_bytes{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"}[6h], 4 * 3600) < 0
    and
      node_filesystem_readonly{fstype!="", fstype!~"tmpfs|ramfs|squashfs|overlay|nsfs|fuse.lxcfs|fuse.snapfuse", mountpoint!~"/run(/.*)?|/var/lib/kubelet/.+|/var/lib/docker/.+"} == 0
    )
  for: 1h
  labels:
    severity: critical
  annotations:
    summary: Filesystem is predicted to run out of space within 4 hours.
    description: Filesystem {{ $labels.mountpoint }} ({{ $labels.device }}) on {{ $labels.instance }} has {{ $value | printf "%.1f" }}% free and, at the current rate, fills up within 4 hours.
    runbook_url: runbooks/node-exporter/NodeFilesystemSpaceFillingUp.md