Search Exchange
Search All Sites
Login
check_multiple
Current Version
.01
Last Release Date
2010-09-01
Compatible With
- Nagios 3.x
Owner
E-mail
Hits
56790
Files:
| File | Description |
|---|---|
| check_multiple.py | check_multiple.py |
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]
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
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]
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 (0)
Be the first to review this listing!


New Listings


