Open
Description
Describe the bug
Current disk usage data collection logic always causes "unhealthy"/"problem" device status in controller
This code
Expected behavior
Disk space monitoring only makes sense for "writeable" filesystems - tmpfs (/dev & /tmp) and jffs2 (/overlay)
Steps To Reproduce
df -P
output on device:
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/root 4608 4608 0 100% /rom
tmpfs 28132 292 27840 1% /tmp
/dev/mtdblock5 512 292 220 57% /overlay
overlayfs:/overlay 512 292 220 57% /
tmpfs 512 0 512 0% /dev
netjson-monitoring --dump
output (cutted and formatted):
"disk": [
{
"filesystem": "/dev/root",
"available_bytes": 0,
"mount_point": "/rom",
"used_percent": 100,
"size_bytes": 4718592,
"used_bytes": 4718592
},
{
"filesystem": "/dev/mtdblock5",
"available_bytes": 225280,
"mount_point": "/overlay",
"used_percent": 57,
"size_bytes": 524288,
"used_bytes": 299008
}
],
System Informatioon:
- OpenWrt Version: 24.10.1, r28597-0425664679 @ Unifi AP (custom build, with openwisp agent added in firmware)
- openwisp-config package version 1.1.0-r2 (from official openwrt repo)
- openwisp-monitoring package version 0.2.0-r2 (from official openwrt repo)