Linux

check_nfs_health.sh

Description:

Nagios plugin (script) to NFS health monitor (NFS server and/or client side). With this plugin you can define client or server NFS side, RPC services which must be checked, add or exclude NFS mountpoints and add or ignore file which contain the information on filesystems on Linux,AIX and Solaris plateforms

Current Version

Last Release Date

June 17, 2009

Compatible With

Owner


Project Files
Project Notes
# NFS health monitor plugin for Nagios # # Written by : Steve Bosek (steve.bosek@gmail.com) # Release : 1.0rc3 # Creation date : 8 May 2009 # Revision date : 19 May 2009 # Package : BU Plugins # Description : Nagios plugin (script) to NFS health monitor (NFS server and/or client side). # With this plugin you can define client or server NFS side, RPC services which must be checked, # add or exclude NFS mountpoints and add or ignore file which contain the information on filesystems # on Linux and AIX plateforms # # # This script has been designed and written on Linux plateform. # # Usage : ./check_nfs_health.sh -i -s -a -x -f # # Check NFS client-side : # check_nfs_health.sh -i client -s default -a none -x none -f add # check_nfs_health.sh -i client -s portmapper,nlockmgr -a /backup,/nfs_share -x /mouth_share -f add # # Check NFS basic client-side : # check_nfs_health.sh -i client -s default -a /backup,/nfs_share -x none -f ignore # # ----------------------------------------------------------------------------------------- # # TODO : - Performance Data (client-side and server-side) : nfsd_cpu, nfsd_used_threads, io_read, io_write, ... # - Solaris, HP-UX, MAC OSX support # - My atrocious English. Help Me ! ;-D # # # ========================================================================================= # # HISTORY : # Release | Date | Authors | Description # --------------+---------------+-----------------------+---------------------------------- # 1.0rc1 | 12.05.2009 | Steve Bosek | Previous version # 1.0rc2 | 15.05.2009 | Steve Bosek | Add AIX Support (bash shell) # Add parameter [-f ] to ignore the file which # contains the information on filesystems: /etc/fstab,.. # 1.0rc3 | 19.05.2009 | Steve Bosek | Add Solaris Support (bash shell) # =========================================================================================
Reviews (3) Add a Review
bug if hostname includes 'nfs'
by rdmarsh, October 31, 2016

Due to the "grep nfs" part it has a bug if your hostname has the letters "nfs" in it, and I guess the same applies for vg, lv or mount names as well. Here's a patch: - Linux ) NFS_MOUNTS=`egrep -v '(^#)' /etc/fstab | grep nfs | awk '{print $2}'`;; + Linux ) NFS_MOUNTS=`awk '!/^(s+)#/ && /(s+)nfs(s+)/ {print $2}' /etc/fstab`;;



Nice
by rrobert, March 31, 2014

Worked fine. Would clean up the grammar a bit. Help should read for example, -x Comma separated list of NFS mounts to exclude from monitoring (default : none) I would like an option to turn off warnings when there are no NFS mounts to monitor, but maybe that's peculiar to my needs.



Running on Solaris
by Mineur, December 31, 2011

Do you really have support for solaris ? I downloaded the last version. Solaris don't use fstab.



Project Stats
Rating
3.8 (5)
Favorites
0
Views
169,767