Qnap Monitoring With Check Mk

PUBLISHED ON 21/12/2017 — DEVELOPMENT

I have implemented monitoring of QNAP devices with CheckMK following this tutorial.

The problem was that if the mount point path was too long for column, df would break the line there and the hack parser mentioned in the tutorial stops working.

To solve this issue, use -P switch with df, to force POSIX compliancy and prevent breaklines.

df -Pk | sed 1d | awk '{print $1" ext4 "$2" "$3" "$4" "$5" "$6}'