If you dig into the checkmk agent (/usr/bin/check_mk_agent
), you’ll find the function section_df()
that collects the data.
Here is an excerpt:
section_df() {
...
excludefs="-x smbfs -x cifs -x iso9660 -x udf -x nfsv4 -x nfs -x mvfs -x prl_fs -x squashfs -x devtmpfs"
...
echo '<<<df_v2>>>'
df -PTlk ${excludefs} | sed 1d
# df inodes information
echo '[df_inodes_start]'
df -PTli ${excludefs} | sed 1d
echo '[df_inodes_end]'
if inpath lsblk; then
echo "[df_lsblk_start]"
lsblk --list --paths --output NAME,UUID
echo "[df_lsblk_end]"
fi
}
So yes, it’s basically a df -T
but with some extra options.