[Nagiosplug-help] check_by_ssh question

Robert Cole robert.cole at support4linux.com
Thu Jun 28 03:48:47 UTC 2007


When I cut and paste the command from the error message and run it 
logged in as nagios from the monitoring server it works just fine but 
when nagios runs it it doesn't work.

Any ideas? Anyone?

nagios at ms1 ~ $ /usr/bin/ssh -i /home/nagios/.ssh/id_dsa 192.168.200.150 
'/usr/nagios/plugins/check_log -F /var/log/youmail/login.log -O 
/home/nagios/192.168.200.150.var.log.login.server.seek -q "No 
ManagedConnections available within configured blocking timeout" '
Log check ok - 0 pattern matches found
nagios at ms1 ~ $

When nagios runs it I get this error on the monitoring web page:

Could not open pipe: /usr/bin/ssh -i /home/nagios/.ssh/id_dsa 
192.168.200.150 '/usr/nagios/plugins/check_log -F 
/var/log/youmail/login.log -O 
/home/nagios/192.168.200.150.var.log.login.server.seek -q "No 
ManagedConnections available within configured blocking timeout" '


Olivier 'Babar' Raginel wrote:
> On Mon, Jun 25, 2007 at 11:31:54AM -0700, Robert Cole wrote:
>   
>>    I tried the single quotes today and still get this error reported:
>>    Could not open pipe: /usr/bin/ssh -i /home/nagios/.ssh/id_dsa
>>    192.168.200.160 '/usr/nagios/plugins/check_log -F
>>    /var/log/youmail/login.log -O
>>    /home/nagios/192.168.200.160.var.log.login.server.seek -q 'No
>>    ManagedConnections available within configured blocking timeout' '
>>     
>
> No you didn't.
> I wrote:
>   
>> Or use simple quotes around the -C for ssh.
>>     
>
> You put the simple quotes around the parameter, the -q. I said the -C.
>
> So do something like:
>
> check_ssh_log!/var/log/youmail/login.log!/home/nagios/$HOSTADDRESS$.var.log.login.server.seek!"No 
> ManagedConnections available within configured blocking timeout"
>
> /home/nagios/.ssh/id_dsa -C '$USER9$/check_log -F $ARG1$ -O $ARG2$ -q 
> $ARG3$'
>
> Or in fact:
> check_ssh_log!/var/log/youmail/login.log!/home/nagios/$HOSTADDRESS$.var.log.login.server.seek!No 
> ManagedConnections available within configured blocking timeout
>
> /home/nagios/.ssh/id_dsa -C '$USER9$/check_log -F $ARG1$ -O $ARG2$ -q "$ARG3$"'
>
> Should do the trick.
>
> Cheers,
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nagios.com/pipermail/nagiosplugin-help/attachments/20070627/f329067b/attachment.html>


More information about the Nagiosplugin-help mailing list