Page 1 of 1

Error - Remote command execution failed

Posted: Thu Jul 12, 2012 6:25 am
by msachikanta
Hi,

I am getting error while running any command from Nagios server through ssh.

./check_by_ssh -l nagios -H 10.29.77.79 -C "/usr/local/nagios/libexec/check_disk -w 20 -c 10 /"

[nagios@apl05038simvt1 libexec]$ ./check_by_ssh -l nagios -H 10.29.77.79 -C "/usr/local/nagios/libexec/check_disk -w 20 -c 10 /"
Remote command execution failed:
[nagios@apl05038simvt1 libexec]$

I am able to login to remote machine (10.29.77.79) by ssh without entering password, but if am executing any remote command its failing. Please help me on this how it can be resolve.

Thanks in advance.

Regards,
Sachikanta

Re: Error - Remote command execution failed

Posted: Fri Jul 13, 2012 10:21 am
by agriffin
What happens if you try to run ssh like this?

Code: Select all

ssh [email protected] "/usr/local/nagios/libexec/check_disk -w 20 -c 10 /"

Re: Error - Remote command execution failed

Posted: Mon Jul 16, 2012 4:09 am
by msachikanta
It gives the below result.

[nagios@apl05038simvt1 ~]$ ssh [email protected] "/usr/local/nagios/libexec/check_disk -w 20 -c 10 /"
DISK OK - free space: / 1026 MB (54% inode=97%);| /=855MB;1963;1973;0;1983

Do i need to run the commands like above syntax...? Please advise.

Regards,
Sachikanta

Re: Error - Remote command execution failed

Posted: Mon Jul 16, 2012 10:09 am
by agriffin
That wasn't the intent I had in having you run that command, but yes, you could run the check like that and it would work fine. Let me know if that's what you're going to do or if you'd like to keep troubleshooting check_by_ssh.