Error - Remote command execution failed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

Error - Remote command execution failed

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Error - Remote command execution failed

Post 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 /"
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

Re: Error - Remote command execution failed

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Error - Remote command execution failed

Post 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.
Locked