MK version: Checkmk Raw Edition 2.4.0p27 (CRE)
OS version: Unraid 7.3.3, Linux kernel 6.18.54-Unraid (x86_64)
Error message:
No explicit error message. This is a potential SMART agent-plugin issue involving disk standby handling.
Both the legacy smart and newer smart_posix plugins execute SMART commands without the -n standby option, potentially waking mechanical hard drives that have deliberately entered standby.
Output of cmk --debug -vvn hostname:
Not applicable at this stage. The monitoring checks are not failing; the concern is that the agent plugins can cause unnecessary physical disk spin-ups.
The issue was identified by inspecting the supplied plugin scripts and capturing actual smartctl executions against a Seagate IronWolf SATA hard drive.
Subject: SMART agent plugins do not respect HDD standby state
I’m running Checkmk Raw Edition 2.4.0p27, monitoring an Unraid 7.3.3 server containing a Seagate IronWolf ST4000VN006 4TB SATA HDD.
During an investigation into unwanted HDD spin-up/spin-down cycles, I discovered that both the legacy smart plugin and its replacement, smart_posix, execute SMART commands without checking whether a disk is in standby.
Legacy SMART plugin
The script contains:
CMD="smartctl -d ata -v 9,raw48 -A $D; smartctl -d sat -v 9,raw48 -A $D"
Kernel and process tracing confirmed that the following command was executed against the IronWolf:
smartctl -d sat -v 9,raw48 -A /dev/disk/by-id/ata-ST4000VN006-3CW104_<serial>
New smart_posix plugin
The replacement plugin supplied with Checkmk 2.4.0p27 contains:
smartctl --all --json=c "$DEVICE"
and:
printf "%s\n" "$DEVICE_ARGS" | xargs smartctl --all --json=c
Neither invocation includes -n standby.
Diagnostic findings
The Unraid server was experiencing repeated HDD wake-ups shortly after entering standby.
Investigation identified Unraid’s own emhttpd SMART polling as another contributing factor. Disabling the Checkmk legacy SMART plugin alone did not resolve the issue.
I am therefore not attributing all observed wake-ups to Checkmk.
However, both Checkmk SMART plugins appear capable of waking sleeping mechanical disks during routine monitoring.
Suggested improvement
Would it be possible to make smart_posix standby-aware, potentially using:
smartctl -n standby --all --json=c "$DEVICE"
Ideally, this could be configurable, allowing administrators to choose whether SMART monitoring should wake sleeping disks.
The plugin would also need to handle devices in standby without generating false monitoring alerts.
Is there an existing supported configuration for this, or would this require an enhancement to the plugin?
Thank you.