[Nagiosplug-help] check_by_ssh issue

Robert Cole robert.cole at support4linux.com
Fri Jun 15 23:13:48 CEST 2007


nagios at ms1 ~ $ /usr/nagios/libexec/check_by_ssh -v -H ocmp0 -i 
$HOME/.ssh/id_dsa -C "/usr/nagios/plugins/check_swap -w 50% -c 10%"
/usr/bin/ssh -i /home/nagios/.ssh/id_dsa ocmp0 
'/usr/nagios/plugins/check_swap -w 50% -c 10%'
Enter passphrase for key '/home/nagios/.ssh/id_dsa':
nagios at ocmp0's password: CRITICAL - Plugin timed out while executing 
system call

This is the timeout I get. The command I quoted was the result but I'm 
not sure which screenshot you think wasn't.

This works:

nagios at ms1 ~ $ ssh -i .ssh/id_dsa ocmp0 "/usr/nagios/plugins/check_swap 
-w 50% -c 10%"
SWAP OK - 100% free (1996 MB out of 1996 MB) |swap=1996MB;998;199;0;1996
nagios at ms1 ~ $

That's just using ssh. Using check_by_ssh doesn't work. I'm using nagios 
plugins v1.4.9 and nagios version 2.9

I'm trying urgently to get this resolved so I posted on both lists since 
I haven't seen any activity for a week or more on this list before my 
posts today so I was unsure anyone was on this list. I'm having a ton of 
plugin issues I'm trying to tackle one at a time and while I see posts 
in other areas with the same issues there are no resolutions posted so I 
decided to stick to these lists and tackle the problems one at a time 
(well maybe more in I can't get this one resolved soon I'll start with 
another issues). Sorry about the double post.

Robert


Holger Weiss wrote:
> * Robert Cole <robert.cole at support4linux.com> [2007-06-15 11:17]:
>   
>> I'm not sure if I found a bug or what but I can login to the remote 
>> system I'm trying to check with key based authentication I can even do a 
>> "ssh -i ~/.ssh/id_dsa remotecomputer "/usr/nagios/plugins/check_swap -w 
>> 50% -c 10%" and it works just fine but when I use:
>>
>> nagios at ms1 ~ $ /usr/nagios/libexec/check_by_ssh -H remotecomputer -i 
>> ~/.ssh/id_dsa -C "/usr/nagios/plugins/check_swap -w 50% -c 10%"
>> Enter passphrase for key '/home/nagios/.ssh/id_dsa':
>>     
>
> 1) Please don't post the same question to two different mailing lists.
> 2) Always use this list for plugin related questions.
> 3) Always mention which Nagios Plugins release you're using.
>
> In your followup post to the Nagios list, you wrote:
>
> | $ nagios at ms1 ~ $ /usr/nagios/libexec/check_by_ssh -H remotecomputer -i -vvvv ~/.ssh/id_dsa -C "/usr/nagios/plugins/check_swap -w 50% -c 10%"
> | Enter passphrase for key '/home/nagios/.ssh/id_dsa':
> | nagios at ocmp0's password:
> |
> | Didn't give me anymore output
>
> If I call check_by_ssh with "-i -vvvv ~/.ssh/id_dsa" (and appropriate
> host/command flags), I get the following error message:
>
> | Remote command execution failed: Warning: Identity file -vvvv does not exist.
>
> So, I'm pretty sure the command you quoted is not the exact command you
> used.  Please always copy'n'paste any commands you tried and the output
> you got.  If you use check_by_ssh's "-v" flag, the plugin should spit
> out the actual ssh(1) command which it executes.  That is, please try
> the command:
>
> $ check_by_ssh -v -H remotecomputer -i $HOME/.ssh/id_dsa -C "/usr/nagios/plugins/check_swap -w 50% -c 10%"
>
> If you copy'n'paste the exact command which is used by check_by_ssh and
> try to execute it manually (as the same user who called check_by_ssh),
> does it really work?
>
> Holger
>
>   




More information about the Help mailing list