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_osx_services

Rating
0 votes
Favoured:
0
Hits
98892
Files:
FileDescription
check_osx_services-1.1.zipcheck_osx_services v. 1.1
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!
check_osx_services uses the serveradmin command built in to OS X Server to check to see if various services are running and (optionally) to set warning and critical thresholds.
This script is typically run via NRPE and utilizes the 'serveradmin' command line
tool that's included with OS X Server to check the status of various built-in
services such as AFP, QuickTime Streaming Server, and DHCP. Since serveradmin
requires root privileges, this script uses sudo to allow the nagios user to execute
the script. See the sample nrpe.cfg file for instructions on adding the nagios
user to the sudoers file.

First add a check command to nrpe.cfg. For example:


commandcheck_afp=sudo /opt/local/libexec/nagios/check_osx_services -s afp


The script will check against warning and critical thresholds for services where it
makes sense to do so. For OS 10.4 those services that accept -w and -c switches are:

afp, smb, qtss, ftp, and jabber -- number of current connections
dhcp -- number of current leases
print -- number of current print jobs
web -- total KBytes

The use of -w and -c switches for these services is optional. If they are not provided,
the check will simply return OK or CRITICAL based on whether the service is running.

Typical usage:


$ ./check_osx_services -s afp -w 10 -c 20
afp: Started - Uptime: 6 hrs 5.30 mins, 0 Connections

$ ./check_osx_service -s web
web: Started - 3519 Total requests, 15564 Total kB

$ ./check_osx_services -s swupdate
swupdate: Started - Uptime: 6 hrs 4.98 mins, Last check: Mon Jan 14 20:53:56 2008


To get a list of available services use the -l switch


$ ./check_osx_services -l
afp
appserver
dhcp
dirserv
... (and so on)