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

check_nfs_health.sh

Rating
5 votes
Favoured:
0
Owner
Hits
161605
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)

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

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.