check_nfs equivalent for OSX

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
forrie
Posts: 25
Joined: Tue Nov 22, 2011 6:50 pm

check_nfs equivalent for OSX

Post 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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check_nfs equivalent for OSX

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
forrie
Posts: 25
Joined: Tue Nov 22, 2011 6:50 pm

Re: check_nfs equivalent for OSX

Post 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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check_nfs equivalent for OSX

Post by lmiltchev »

You can probably use:

Code: Select all

diskutil list
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
forrie
Posts: 25
Joined: Tue Nov 22, 2011 6:50 pm

Re: check_nfs equivalent for OSX

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_nfs equivalent for OSX

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked