I can get check_by_ssh to work fine when it calls a single check. But rather than incur the overhead of multiple ssh invocations, I want to make one call for more than one check.
Here is what happens when I run it from the command line:
TSXUTIL01:/usr/local/nagios/libexec # ./check_by_ssh -H xxx.xxx.31.12 --logname=nagios --service=swap:disk --command='/usr/local/nagios/libexec/check_swap -w 20 -c 10' --command='/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /'
Password:
SWAP OK - 100% free (4102 MB out of 4102 MB) |swap=4102MB;0;0;0;4102
STATUS CODE: 0
DISK OK - free space: / 17731 MB (94% inode=98%);| /=957MB;19668;19678;0;19688
STATUS CODE: 0
When I create it as a command in Nagios, then use the command in a service, the host shows only the swap service check. How do I get Nagios to accept it as two services and display them both?
TIA!