On 2016-05-05 14:22, Stephen Berg (Contractor) wrote: > Had this problem for quite awhile now, still haven't found a solution. > > We use NFS automounts quite extensively here. Lot's of filesystems that show > up (to the user's) as /u/<blah>. On the system where the filesystem actually > lives it will be available as /u/<blah> and also /export/<blah>. If the > /u/<blah> mount point is mounted on a system where it's hosted df doesn't > show the /export/<blah> mount point and the check_mk service to monitor that > filesystem goes into an UNKN state. > > I think it's because the agent see the bind mount and ignores the actual > mount point in it's df output. > > If I look in /proc/mounts I see: > > /dev/mapper/732254-common mounted on /export/new_common > > and > > /dev/mapper/732254-common mounted on /common > > That's what I expect to see, but running df I only see the filesystem mounted > on /common. That's where check_mk gets messed up since it inventoried the > filesystem as being on /export/new_common. > > Is there anyway to get df to ignore automounted mount points and only show > the actual mount point? I've looked through the man page and can't find any > option to get that to happen. > >
Long time ago since I played with check_mk, but I remember the agent was a simple shell script. looking up the agent code in the check_mk git ... http://git.mathias-kettner.de/git/?p=check_mk.git;a=blob_plain;f=agents/check_mk_agent.linux;hb=refs/heads/master echo '<<<df>>>' # The exclusion list is getting a bit of a problem. -l should hide any remote FS but seems # to be all but working. excludefs="-x smbfs -x cifs -x iso9660 -x udf -x nfsv4 -x nfs -x mvfs -x zfs -x prl_fs" ... There a is a special handling for the nfs mounts, where you can try to fix / change the reporting # Check NFS mounts by accessing them with stat -f (System # call statfs()). If this lasts more then 2 seconds we # consider it as hanging. We need waitmax. if type waitmax >/dev/null ... -- HTH, olli
