<div>Hi,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>example check_</div>
<div>check_host1_tomcatA $arg1$, $arg2$ </div>
<div>&</div>
<div>check_host2_tomcatA,$arg1$, $arg2$ </div>
<div> </div>
<div>where $arg1$ is the forwarded port on the gateway, $ARG2$ = 8080 for tomcatA and $ARG2$ =8090 for tomcatB </div>
<div> </div>
<div>To write a restart command i need to know the $ARG1$ of the failing service, .</div>
<div>For now is seems that the script is started leaving $arg1 blanco,</div>
<div>The $arg1$ is binded to the command and i cannot give a different value for each service .</div>
<div> </div>
<div>please tell me i'm wrong. </div>
<div> </div>
<div><br>define command {<br> command_name action_restart_tomcat_8070<br> command_line ssh $HOSTADDRESS$ -p $ARG1$ -l "$USER17$" -o stricthostkeychecking=no -C " sudo -u cronos /home/cronos/scripts/start_tomcat 8070"
<br>}<br>where i nees something like this</div>
<div> </div>
<div>define command {<br> command_name action_restart_tomcat_8070<br> command_line ssh $HOSTADDRESS$ -p <strong>$failingservice.ARG1$</strong> -l "$USER17$" -o stricthostkeychecking=no -C " sudo -u cronos /home/cronos/scripts/start_tomcat 8070"
<br>}</div>
<div> </div>
<div> </div>