|
NagiosPluginInstallation
Installing the plugin on Nagios
Prerequisites
InstallationplistlibThis can be downloaded directly from http://svn.python.org/projects/python/trunk/Lib/plistlib.py, it may be available on Redhat/Fedora via yum but it is available on Debian/Ubuntu by: sudo aptitude install python-plistlib If it is not available system wide then copy the plistlib.py file into the same directory you have stored the plugins (possibly /usr/lib/nagios/plugins/). Plugin InstallationThis is a simple case of copying them to the correct plugin location where the rest of the Nagios plugins are stored on your distribution (or OS). On a Debian/Ubuntu system it is: /usr/lib/nagios/plugins/ You will then need to update the osx_server.cfg file included in the tarball and modify the values NAGIOS_PLUGIN_PATH and NAGIOS_EVENT_HANDLER_PATH to the correct path. It should then be merged into your master config or added into the correct config search path. On Ubuntu copying it to: /etc/nagios-plugins/config/ Was enough for it to be picked up by Nagios. NOTE: If your event handler location is different from the plugin path and you have not installed plistlib.py and srvrmgrdIO.py system wide then you will need to copy those files in with the event handler also. libServerManagerDaemon.iniThis is an optional step but if you want to change some of the default behavoir this file needs to be copied to /etc/ and can be edited with a text editor. The initial values of OFF (in this case 0) are what the plugin will assume if no such config file exists. Configuring A ServiceAssuming we have a server setup already called server.domain.lcl then monitoring Apple File Share Protocol is possible by with: define service{
, host_name server.domain.lcl
service_description OS X AFP
check_command check_osx_afp!311!username!password
use generic-service
}You might need to modify this slightly depending on your Nagios configuration, this was from an Ubuntu installation. Points to note are you only need to supply 3 values
Note you could use Nagios $USERx$ variables if you have enough free or have a common account across servers. Sub-Service AlertsSome services come with many sub-services which can be off/failed while the master service is fine. For instance the QTSS or Quicktime Streaming Server, has AFP, DHCP, HTTP, NFS, TFTP sub-services. If any of these is in a stopped state we will be alerted. This might not always be desirable. Simply running the check_osx_server command with no arguments will output each service and it's corresponding sub-services. If you add and extra comma seperated list in your config you can switch off the check on those sub-services. For example: check_osx_server jabber 172.16.12.1 311 srvadmin srvpassword mucState,proxyState mucState & proxyState will be ignored and will not trigger a warning if they are stopped. In the config setup that would be: define service{
, host_name server.domain.lcl
service_description OS X Jabber
check_command check_osx_jabber!311!srvadmin!srvpassword!mucState,proxyState!
use generic-service
}Troubleshooting
401 Error
404 Error
(null) Output
|