8000 [bug] Current disk usage data collection logic always causes "unhealthy"/"problem" device status in controller · Issue #156 · openwisp/openwrt-openwisp-monitoring · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[bug] Current disk usage data collection logic always causes "unhealthy"/"problem" device status in controller #156
Open
@AdUser

Description

@AdUser

Describe the bug
Current disk usage data collection logic always causes "unhealthy"/"problem" device status in controller

This code

if filesystem ~= 'tmpfs' and not string.match(filesystem, 'overlayfs') then
should also ignore filesystem on "rootfs" partition (like /rom below), as it always read-only squashfs, has minimal possible size and thus always used for 100%. See explanation in official openwrt docs here

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
      }
    ],

Screenshots
Image
Image

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0