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_supervisor

Current Version
1.1
Last Release Date
2014-12-21
Compatible With
  • Nagios 3.x
Owner
E-mail
License
GPL
Hits
8525
Files:
FileDescription
check_supervisord.pycheck_supervisord.py
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
A plugin to check supervisord processes via xmlrpc interface. No need to install anything to remote hosts.

Tested on CentOS 7 / Nagios 3.5.1
Requires: python-dateutil
Usage: check_supervisord.py -H 192.168.1.1 -P 9001 -u superv -p superv -a glassfish

Options:
-h, --help
-H HOSTNAME, --hostname=HOSTNAME (Supervisord hostname)
-P PORT, --port=PORT (Supervisord port)
-u USERNAME, --username=USERNAME (Supervisord username)
-p PASSWORD, --password=PASSWORD (Supervisord password)
-a PROCNAME, --process-name=PROCNAME (Process name defined in /etc/supervisor.d/*.ini file or supervisorctl status)

Console Output:
[root@nagios ~]# /usr/lib64/nagios/plugins/check_supervisord.py -H 192.168.9.10 -P 9001 -u superv -p superv -a glassfish
glassfish OK: 12 day(s) 16 hour(s) 37 minute(s)


You should add the new command definition for check_supervisord into nagios's commands.cfg
### /etc/nagios/objects/commands.cfg
define command{
command_name check_supervisord
command_line $USER1$/check_supervisord.py -H $HOSTADDRESS$ -P $ARG1$ -u $ARG2$ -p $ARG3$ -a $ARG4$
}

And you can use in a definition like this
### /etc/nagios/conf.d/glassfish.cfg
define service {
use generic-service
host_name srv10
service_description Glassfish
check_command check_supervisord!9001!superv!superv!glassfish
}

If you want to know more about how to use supervisord or how to daemonize applications with it please read http://ae.koroglu.org/best-way-to-daemonize-applications-on-linux