I’m running checkmk version 2.5.0p15 installed in a Proxmox LXC container using a Proxmox Community Script.
When I install the openwrt agent bundled with checkmk from Setup > Agents > Other operating systems > Agents > check_mk_agent.openwrt onto a TP-Link Archer C7 V2 device running OpenWrt Version 25.12.5, no Filesystem services are listed at Monitor > Overview > All hosts > hostname > Services for the host.
On inspecting check_mk_agent.openwrt, the <<<df>>> services are collected by the following code:
section_df() {
# Print out Partitions / Filesystems. (-P gives non-wrapped POSIXed output)
# Note: BusyBox df does not support -x and -l as arguments
# If you add a IS_DOCKERIZED check here please inform the kubernetes team
# who uses this agent without modifications. They expect it to be run
# without docker detection.
if ! inpath waitmax; then
return
fi
echo '<<<df>>>'
waitmax -s 9 5 df -kPT
# df inodes information
if waitmax -s 9 5 df -i >/dev/null 2>&1; then
echo '<<<df>>>'
echo '[df_inodes_start]'
waitmax -s 9 5 df -PTi
echo '[df_inodes_end]'
fi
}
Running the check_mk_agent.openwrt agent remotely via SSH on the OpenWrt device reveals that the <<df>> information is not being collected.
user@hostname:~$ ssh root@xxx.xxx.xxx.xxx /usr/bin/check_mk_agent |
awk '/^<<<df>>>$/ { show=1; print; next }
/^<<</ { if (show) exit }
show'
user@hostname:~$
Upon further investigation, waitmax is not installed on the OpenWrt device and section_df() returns before echoing the df section.
The Openwrt 25.12.5 device has the following busybox package and waitmax is not installed:
apk list --installed | grep -E '^busybox'
busybox-1.37.0-r6 mips_24kc {feeds/base/utils/busybox} (GPL-2.0) [installed]
root@hostname:~# waitmax
-ash: waitmax: not found
To perform a diagnostic test, I modified the section_df() to remove the waitmax references, and comments for brevity, to confirm that the missing waitmax is the root cause (note this code also removes the waitmax timeout protection), yielding:
section_df() {
# filesystem disk usage information
echo '<<<df>>>'
df -kPT
# df inodes information
if df -i >/dev/null 2>&1; then
echo '<<<df>>>'
echo '[df_inodes_start]'
df -PTi
echo '[df_inodes_end]'
fi
}
Running the modified check_mk_agent.openwrt agent, without the waitmax code, remotely via SSH on the OpenWrt device, yields:
ssh root@xxx.xxx.xxx.xxx /usr/bin/check_mk_agent |
awk '/^<<<df>>>$/ { show=1; print; next }
/^<<</ { if (show) exit }
show'
<<<df>>>
Filesystem Type 1024-blocks Used Available Capacity Mounted on
/dev/root squashfs 5120 5120 0 100% /rom
tmpfs tmpfs 60364 1948 58416 3% /tmp
/dev/mtdblock4 jffs2 8448 8144 304 96% /overlay
overlayfs:/overlay overlay 8448 8144 304 96% /
tmpfs tmpfs 512 0 512 0% /dev
This modified agent now correctly reports the following Filesystem services at Monitor > Overview > All hosts > hostname > Services for the host:
- Filesystem /
- Filesystem /overlay
- Filesystem /rom
I also have an older OpenWrt Version 23.05.5 device with the Busybox version 1.36.1 package, which also does not have waitmax installed.
root@hostname:~# opkg list-installed | grep '^busybox'
busybox - 1.36.1-1
root@hostname:~# waitmax
-ash: waitmax: not found
So waitmax is not installed on both the OpenWrt 25.12.5 and OpenWrt 23.05.5 systems.
Is there an alternative that can be used to implement the waitmax timeout behavior for OpenWrt systems that do not have waitmax installed?
I’m posting this bug fix request here, as I was unable to determine how or where to submit a bug fix request for an agent.
Any guidance would be appreciated.