reuse arguments from service to invoke eventhandler

Tommy Mestdagh it.mestdagh.tommy at gmail.com
Wed Mar 21 11:23:34 CET 2007


Hi,

I have multiple ssh_services that use 1 check command,  where i use "ssh -p
$arg1$" to define  a custom port. That is forwarded from a gatewayhost to
the one to check host.

example check_
check_host1_tomcatA $arg1$, $arg2$
&
check_host2_tomcatA,$arg1$, $arg2$

where $arg1$ is the forwarded port on the gateway,  $ARG2$ = 8080
for tomcatA and $ARG2$ =8090 for tomcatB

To write a restart command i need to know the $ARG1$ of the failing service,
.
For now is seems that the script is started leaving $arg1 blanco,
The $arg1$  is binded to the command and i cannot give a different value for
each service .

please tell me i'm wrong.


define command {
                command_name                    action_restart_tomcat_8070
                command_line                    ssh $HOSTADDRESS$ -p $ARG1$
-l "$USER17$" -o  stricthostkeychecking=no -C " sudo -u cronos
/home/cronos/scripts/start_tomcat  8070"
}
where i nees something like this

define command {
                command_name                    action_restart_tomcat_8070
                command_line                    ssh $HOSTADDRESS$ -p *
$failingservice.ARG1$* -l "$USER17$" -o  stricthostkeychecking=no -C " sudo
-u cronos  /home/cronos/scripts/start_tomcat  8070"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070321/3e00103e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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