Is it possible to nest check_by_ssh commands?

nemir nemiria nemir at hotmail.com
Wed Mar 28 03:02:03 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: Meet Sexy Singles at Lavalife today. Click here 
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D25448&_t=754951090&_r=meet&_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