Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_nfs_health.sh

Rating
5 votes
Favoured:
0
Owner
Hits
169827
Files:
FileDescription
check_nfs_health.shcheck_nfs_health.sh 1.0rc2 (add AIX support)
check_nfs_health.shcheck_nfs_health.sh 1.0rc3 (add Solaris support)
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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
# 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)
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`;;
byrrobert, March 14, 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.
byMineur, December 14, 2011
0 of 1 people found this review helpful
Do you really have support for solaris ? I downloaded the last version. Solaris don't use fstab.