> Do you have the keys setup and ssh on the receiving end configured to
> allow
> authentication via PKI key?  My off-hand guess is that your script is
> failing
> when it is prompted for a userid and/or password by the other end of the
> connection.
>
> -jeff

Indeed i have setup a keychain so it won't ask for a password.
The strange thing is if i run the script by hand it won't ask anything and
runs perfectly.




> Quoting erestor Elensar <[EMAIL PROTECTED]>:
>
>> Hi,
>>
>> I have a problem with a self written alert.
>> This script must change two routing tables, exec a ssh command and write
>> ta text to a log file. It does everything execept the ssh command.
>> If i run the alert manualy all work perfectly. this script is crutial in
>> our failover setup.
>> Here are my configs
>>
>> /etc/mon/mon.cf
>> alertdir   = /usr/lib/mon/alert.d
>> mondir     = /usr/lib/mon/mon.d
>> logdir     = /var/log/mon.d
>> statedir   = /var/lib/mon.d
>> maxprocs    = 20
>> histlength = 100
>> randstart = 60s
>>
>> hostgroup router 10.32.0.210
>> hostgroup 100mbit 10.32.100.2
>>
>> watch router
>>     service ping
>>         interval 5s
>>         monitor ping.monitor
>>         period wd {Mon-Sun}
>>             alert bring-ha-down.alert
>>                 alertevery 10s
>>             upalert bring-ha-up.alert
>>                 alertevery 10s
>>
>> watch 100mbit
>>     service ping
>>         interval 5s
>>         monitor ping.monitor
>>         period wd {Mon-Sun}
>>             alert use-framerelay.alert
>>             upalert use-100mbit.alert
>>
>> The alerts
>> /usr/lib/mon/alert.d/use-framerelay.alert
>> #!/bin/ksh
>>
>> # change the local routing tables to framerelay
>> /etc/openvpn/route-scripts/up-bxl-ucc-falconstore-framerelay.sh
>> /etc/openvpn/route-scripts/up-bxl-ucc-data-framerelay.sh
>>
>> # Change route at UCC to framerelay
>> ssh [EMAIL PROTECTED] /usr/lib/mon/alert.d/use-framerelay.alert
>>
>> echo " Failover to Framerelay active on: " `date` >>
>> /var/log/failover.log
>>
>> The log file
>> /var/log/failover.log
>> Failover to Framerelay active on:  Sat Nov 26 14:57:15 CET 2005
>> Failover switch back to 100Mbit on:  Sat Nov 26 14:57:44 CET 2005
>>
>> I hope that someone can help me.
>> TIA
>>
>>
>>
>> _______________________________________________
>> mon mailing list
>> mon@linux.kernel.org
>> http://linux.kernel.org/mailman/listinfo/mon
>>
>
>
>
>


_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to