37 lines
1.1 KiB
Markdown
37 lines
1.1 KiB
Markdown
---
|
|
id: 8f344d36-6005-4bfa-aa98-4e68d571a174
|
|
type: fix
|
|
title: "Fix: health_check.py disk check excludes squashfs/tmpfs/devtmpfs to prevent snap mount false positives"
|
|
tags: [monitoring, claude-runner-monitoring, python, fix, homelab, snap]
|
|
importance: 0.7
|
|
confidence: 0.8
|
|
created: "2026-02-20T20:16:35.251352+00:00"
|
|
updated: "2026-02-20T20:16:35.251352+00:00"
|
|
---
|
|
|
|
## Problem
|
|
|
|
VM 106 (pihole1) runs Ubuntu with snap packages. Snap mounts are squashfs filesystems that are read-only and always report 100% disk usage. The `df` command in `health_check.py` was including these mounts, causing false critical alerts on any server with snap packages installed.
|
|
|
|
## Fix
|
|
|
|
Changed `df` command on line 228 of `health_check.py` from:
|
|
|
|
```bash
|
|
df -h --output=pcent,target
|
|
```
|
|
|
|
to:
|
|
|
|
```bash
|
|
df -h --output=pcent,target -x squashfs -x tmpfs -x devtmpfs
|
|
```
|
|
|
|
## Impact
|
|
|
|
Prevents false positive disk space alerts on any monitored server that has snap packages installed. Also excludes tmpfs and devtmpfs which are virtual/RAM filesystems that don't represent real disk usage concerns.
|
|
|
|
## Project
|
|
|
|
CT 302 claude-runner-monitoring, file: `health_check.py`
|