Monitoring NFS mounts

Matthew Pounsett <[email protected]> Mon, 17 Dec 2018 12:18:41 -0500
Newsgroups gmane.network.nagios.plugins
Message-ID <CAAiTEH_fnYTb5A8Z_0-G160H3Ly+Bmx5UTgfWuwB6f0sPCak-g__34110.9262466945$1545067012$gmane$org@mail.gmail.com>
--00000000000095f111057d3af92e
Content-Type: text/plain; charset="UTF-8"

Before I start writing code that might be reinventing the wheel... does
anyone have a favourite method for monitoring the presence of an NFS
mount?

check_disk is fine if the NFS volume is mounted and something goes wrong
with it (like the NFS server going down) but gives a false positive if the
volume simply isn't mounted.  In that case it gives an OK result based on
the closest enclosing volume of the mount point.

For example, if I'm using check_disk to monitor an NFS volume mounted at
/mnt/foo, it will correctly fail if the remote NFS server stops responding,
but will report success if I 'umount /mnt/foo'.  In that case it'll report
OK and give the stats for the root ("/") volume.

--00000000000095f111057d3af92e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div>Before I start writing code that might be reinven=
ting the wheel... does anyone have a favourite method for monitoring the pr=
esence of an NFS mount?=C2=A0=C2=A0</div><div><br></div><div>check_disk is =
fine if the NFS volume is mounted and something goes wrong with it (like th=
e NFS server going down) but gives a false positive if the volume simply is=
n&#39;t mounted.=C2=A0 In that case it gives an OK result based on the clos=
est enclosing volume of the mount point.</div><div><br></div><div>For examp=
le, if I&#39;m using check_disk to monitor an NFS volume mounted at /mnt/fo=
o, it will correctly fail if the remote NFS server stops responding, but wi=
ll report success if I &#39;umount /mnt/foo&#39;.=C2=A0 In that case it&#39=
;ll report OK and give the stats for the root (&quot;/&quot;) volume.</div>=
<div><br></div><div><br></div></div>

--00000000000095f111057d3af92e--