Page 1 of 1
check_nfs equivalent for OSX
Posted: Thu Sep 12, 2013 2:03 pm
by forrie
I need to check a few OSX (10.8.x) systems to verify local NFS mounts (to a remote system, not local exports). The existing script will not work, due to it needing /proc and /etc/mtab.
I've looked in the nagios exchange and only found server monitoring.
Since OSX is not my specialty, I wonder if someone here may have a shell script solution I can plug in to Nagios and make the monitoring system happy.
Thanks.
Re: check_nfs equivalent for OSX
Posted: Thu Sep 12, 2013 4:01 pm
by lmiltchev
There are a few scripts here - not sure if they are going to work (OSX is not my specialty either.

).
http://exchange.nagios.org/directory/Pl ... System/NFS
You can run checks locally (on the remote machines), and use NRPE.
Re: check_nfs equivalent for OSX
Posted: Thu Sep 12, 2013 6:22 pm
by forrie
I did look there; the scripts are geared towards Linux-type systems. OSX does things a little differently. I know that there's fstab, but it's managed otherwise. Lots of differences.
Re: check_nfs equivalent for OSX
Posted: Fri Sep 13, 2013 10:17 am
by lmiltchev
You can probably use:
or showmount...
https://developer.apple.com/library/mac ... unt.8.html
Once you figure out what check would work for you, you can run it via NRPE.
Re: check_nfs equivalent for OSX
Posted: Tue Oct 15, 2013 3:43 pm
by forrie
The diskutil command refers only to local mounts (not NFS mounts, at least). Showmount is intended for checking remote systems -- it doesn't work properly on this OSX station as it's not exporting any NFS mounts, only importing.
Re: check_nfs equivalent for OSX
Posted: Tue Oct 15, 2013 5:02 pm
by abrist
To add to Ludmil's statement - you will need to find a cli utility that can check the metric you want from the mounted filesystem. Then you could create a wrapper script to be run from nrpe.