Home Directory Plugins Others check_multiple

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


Remember Me


Current Version
Last Release Date
Compatible With
  • Nagios 3.x
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin will let you pass in a list of commands to be executed. It can be configured to fail if one command fails, or only if they all fail.
I created this so there would be a single generic way to get the status (up/down) of any host. Although i imagine there may be other uses.

Using a single nagios check, i can query the status of a linux and windows host - by doing both an SSH and a remote desktop test. Or do a ping test, and a SSH test, in case ping is blocked. you can configure as many commands as you want.

example command that will check SSH and ping:
define command{

command_name check-host-alive-multiple

command_line $USER1$/check_multiple --mode one --commands "$USER1$/check_ping -H $HOSTADDRESS$ -w 1000.0,80% -c 1000.0,100% -p 5@#%$USER1$/check_http -H $HOSTADDRESS$@#%$USER1$/check_ssh -H $HOSTADDRESS$"

usage: check_multiple [options]
-h, --help show this help message and exit
--commands=COMMANDS string of commands to run. enclose in quotes. seperate each command by @#% eg command1@#%command2

--mode=MODE specify 'one' or 'all'. 'one' will return true if any one of the checks is successfull. 'all' will return false if any one of the checks fail. default is all
Reviews (1)
All good. The coding style could be a bit more Pythonic and all checks are executed sequentially.

I made an updated version that you can find here: https://bitbucket.org/flyingcircus/fc.platform/commits/1e4a68f477f08b79568bd931cfdbe80ec08908d4