[Nagiosplug-help] check_by_ssh question

Robert Cole robert.cole at support4linux.com
Mon Jun 25 20:31:54 CEST 2007


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' '

My current configuration looks like this:

define service{
        use                             minor-service
        hostgroup_name                  tuis
        service_description             Oracle Database Connection Check
        check_command                   
check_ssh_log!/var/log/youmail/login.log!/home/nagios/$HOSTADDRESS$.var.log.login.server.seek!'No 
ManagedConnections available within configured blocking timeout'
        max_check_attempts              1
        notification_options            c
        }

define command{
        command_name    check_ssh_log
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -i 
/home/nagios/.ssh/id_dsa -C "$USER9$/check_log -F $ARG1$ -O $ARG2$ -q 
$ARG3$ "
        }

And when I try just creating a static command like this:

define command{
        command_name    check_youmail_log
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -i 
/home/nagios/.ssh/id_dsa -C "$USER9$/check_log -F 
/var/log/youmail/login.log -O 
/home/nagios/$HOSTADDRESS$.var.log.login.server.seek -q 'No 
ManagedConnections available within configured blocking timeout'"
        }

I get this:

Unknown argument: ManagedConnections

Any ideas?

As always your help is very much appreciated.

Robert

Olivier 'Babar' Raginel wrote:
> On Fri, Jun 22, 2007 at 01:50:32PM -0700, Robert Cole wrote:
>   
>> nagios at ms1 ~ $ ssh  tui001 -i ~/.ssh/id_dsa -C 
>> "/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""
>> Unknown argument: ManagedConnections
>> Usage: check_log -F logfile -O oldlog -q query
>> Usage: check_log --help
>> Usage: check_log --version
>> Any ideas?
>>     
>
> Command interpretation.
> Your command is enclosd within "" so you have to escape them within the 
> ssh:
> $ ssh  tui001 -i ~/.ssh/id_dsa -C 
> "/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\""
>
> Or use simple quotes around the -C for ssh.
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20070625/54d4aeca/attachment.html>


More information about the Help mailing list