Is it possible to nest check_by_ssh commands?

nemir nemiria nemir at hotmail.com
Wed Mar 28 02:55:59 CEST 2007


I have a nagios server monitoring a unix server and use check_by_ssh to get 
results.  It works great.

I have recently added a second NIC to this server to allow it to see a few 
boxes in a small isolated network.  The nagios server can't see these boxes 
directly and I was thinking that I might be able to nest check_by_ssh to run 
some checks on things like disk and cpu.


>From the unix server I can run the following on a command line and get an 
appropriate response.

check_by_ssh -t 20 -H 192.168.166.2 -C "/usr/local/nagios/libexec/check_disk 
-w 10% -c 7% -p /"


If I try to encapsulate that into a nested check_by_ssh I get the following:

check_by_ssh -t 40 -H 172.30.30.216 -C "/usr/local/nagios/check_by_ssh -t 20 
\
-H 192.168.166.5 -C "/usr/local/nagios/libexec/check_disk -w 10% -c 7% -p 
/""
check_by_ssh: invalid option -- w
check_by_ssh: Unknown argument - (null)

Is this possible to do?

Or do I need to write some scripts to encapsulate the check_by_ssh command 
instead?

TIA

Nemir

_________________________________________________________________
Advertisement: Your Future Starts Here. Dream it? Then be it! Find it at 
www.seek.com.au  
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2F%3Ftracking%3Dsk%3Ahet%3Ask%3Anine%3A0%3Ahot%3Atext&_t=754951090&_r=seek&_m=EXT


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list