Page 1 of 1

Mount points monitoring

Posted: Wed Mar 11, 2020 8:11 am
by RIDS_I2MP
Hi Team,

We want to monitor if a particular filesystem is mounted or not in unix/linux servers.
For eg:
/dev/fslv02 49.50 35.46 14.04 72% /testfs
NON-PROD> root@eu2naslpar: / >

So as per above example, if /testfs is mounted on any server, Nagios should show like "/testfs is mounted". If it is unmounted, Nagios should send alert saying it has been unmounted.

Please let me know what all plugins are available, which one be best to use and how to configure it.
nrpe is running on those servers already, it is just an additional requirement.

Thanks

Re: Mount points monitoring

Posted: Wed Mar 11, 2020 10:37 am
by jdunitz
As it happens, someone else recently had almost the same question, and I'd give you the same answer I gave them:
https://support.nagios.com/forum/viewto ... 16&t=57593


That particular plugin is pretty full-featured. If you need something a bit simpler, there's also this one:

https://exchange.nagios.org/directory/P ... nt/details

The output is in Portuguese, but it's pretty clear what it's telling you:

Code: Select all

[root@localhost ~]# ./check_mount.sh -p /boot -t ext4
Ponto de montagem /boot está OK
[root@localhost ~]# ./check_mount.sh -p /i_dont_have_this_filesystem -t ext4
Ponto de montagem /i_dont_have_this_filesystem não está montado
[root@localhost ~]#
It's just a few lines of code, so translating the messages to English (or whatever language you like) would be a pretty quick task.

Hope that helps!