Page 1 of 1

missing mount point monitoring.

Posted: Sun Jul 18, 2021 11:17 pm
by informatica
Hi Team,

we would like to monitor the missing mount point in linux servers. Earlier we faced the issue like we have added the mount point in linux server but after somedays we could not see mount point in linux server.

could you please help us how to monitor the missing point point or if any mount point is not visible we should get the alert.

Re: missing mount point monitoring.

Posted: Mon Jul 19, 2021 2:28 pm
by benjaminsmith
Hi,

There is a community plugin on the Nagios Exchange for checking mount points (using fstab). Let me know if that would work for you.
./check_mountpoints.sh -h

Usage: check_mountpoints.sh [-m FILE] $mountpoint [$mountpoint2 ...]
Usage: check_mountpoints.sh -h,--help
Options:
-m FILE Use this mtab instead (default: /proc/mounts)
-f FILE Use this fstab instead (default: /etc/fstab)
-N NUMBER FS Field number in fstab (default: 3)
-M NUMBER Mount Field number in fstab (default: 2)
-O NUMBER Option Field number in fstab (default: 4)
-T SECONDS Responsetime at which an NFS is declared as staled (default: 3)
-L Allow softlinks to be accepted instead of mount points
-i Ignore fstab. Do not fail just because mount is not in fstab. (defa ult: unset)
-a Autoselect mounts from fstab (default: unset)
-A Autoselect from fstab. Return OK if no mounts found. (default: unse t)
-o When autoselecting mounts from fstab, ignore mounts having noauto f lag. (default: unset)
-w Writetest. Touch file $mountpoint/.mount_test_from_$(hostname) (def ault: unset)
-e ARGS Extra arguments for df (default: unset)
MOUNTPOINTS list of mountpoints to check. Ignored when -a is given

Check if nfs/cifs/davfs mountpoints are correctly implemented and mounted.
Simple example:

Code: Select all

[root@localhost libexec]# ./check_mountpoints.sh /
OK: all mounts were found ( /)
[root@localhost libexec]#
Regards,
Benjamin

How to setup a plugin from the Nagios Exchange:
Third-Party Plugins in Nagios XI