Remote commnad execution failed
Remote commnad execution failed
I'm using SSH Proxy wizard to connect to remote Linux RHEL 5.5 host to get statistics.
However, the service status for my host shows me the following:
Check breeze
Unknown 27m 46s 4/4 2012-02-28 08:21:19 Remote command execution failed: bash: /usr/local/nagios/libexec/check_breeze: No such file or directory
Check Load
Unknown 28m 53s 4/4 2012-02-28 08:25:12 Remote command execution failed: bash: /usr/local/nagios/libexec/check_load/: No such file or directory
Check Log
Unknown 28m 20s 4/4 2012-02-28 08:25:45 Remote command execution failed: bash: /usr/local/nagios/libexec/check_log/: No such file or directory
Check nwstat
Unknown 27m 13s 4/4 2012-02-28 08:21:52 Remote command execution failed: bash: /usr/local/nagios/libexec/check_nwstat/: No such file or directory
Current Users
Unknown 26m 40s 5/5 2012-02-28 08:23:25 Remote command execution failed: bash: /usr/local/nagios/libexec/check_users: No such file or directory
Mrtg
Unknown 26m 6s 4/4 2012-02-28 08:22:59 Remote command execution failed: bash: /usr/local/nagios/libexec/check_mrtg/: No such file or directory
Mrtgtraf
Unknown 25m 33s 4/4 2012-02-28 08:23:32 Remote command execution failed: bash: /usr/local/nagios/libexec/check_mrtgtraf/: No such file or directory
Ping
Ok 25m 0s 1/5 2012-02-28 08:21:05 OK - 10.70.10.16: rta 1.157ms, lost 0%
Root Disk Space
Unknown 24m 26s 5/5 2012-02-28 08:25:39 Remote command execution failed: bash: /usr/local/nagios/libexec/check_disk: No such file or directory
Total Processes
Unknown 28m 36s 5/5 2012-02-28 08:21:06 Remote command execution failed: bash: /usr/local/nagios/libexec/check_procs: No such file or directory
It appears that /usr/local/nagios/* directory does not even exist on the remote host.
Am I missing smth. that needed to be installed on the remote host besides just creating "nagios" user account and setting up passwordless ssh access to that account?
Thanks.
However, the service status for my host shows me the following:
Check breeze
Unknown 27m 46s 4/4 2012-02-28 08:21:19 Remote command execution failed: bash: /usr/local/nagios/libexec/check_breeze: No such file or directory
Check Load
Unknown 28m 53s 4/4 2012-02-28 08:25:12 Remote command execution failed: bash: /usr/local/nagios/libexec/check_load/: No such file or directory
Check Log
Unknown 28m 20s 4/4 2012-02-28 08:25:45 Remote command execution failed: bash: /usr/local/nagios/libexec/check_log/: No such file or directory
Check nwstat
Unknown 27m 13s 4/4 2012-02-28 08:21:52 Remote command execution failed: bash: /usr/local/nagios/libexec/check_nwstat/: No such file or directory
Current Users
Unknown 26m 40s 5/5 2012-02-28 08:23:25 Remote command execution failed: bash: /usr/local/nagios/libexec/check_users: No such file or directory
Mrtg
Unknown 26m 6s 4/4 2012-02-28 08:22:59 Remote command execution failed: bash: /usr/local/nagios/libexec/check_mrtg/: No such file or directory
Mrtgtraf
Unknown 25m 33s 4/4 2012-02-28 08:23:32 Remote command execution failed: bash: /usr/local/nagios/libexec/check_mrtgtraf/: No such file or directory
Ping
Ok 25m 0s 1/5 2012-02-28 08:21:05 OK - 10.70.10.16: rta 1.157ms, lost 0%
Root Disk Space
Unknown 24m 26s 5/5 2012-02-28 08:25:39 Remote command execution failed: bash: /usr/local/nagios/libexec/check_disk: No such file or directory
Total Processes
Unknown 28m 36s 5/5 2012-02-28 08:21:06 Remote command execution failed: bash: /usr/local/nagios/libexec/check_procs: No such file or directory
It appears that /usr/local/nagios/* directory does not even exist on the remote host.
Am I missing smth. that needed to be installed on the remote host besides just creating "nagios" user account and setting up passwordless ssh access to that account?
Thanks.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Remote commnad execution failed
You will need to install any plugins you would like to use on the machine you are connecting to.
You can get the most common pre-installed plugins from http://nagiosplugins.org/ and others from the Exchange
http://exchange.nagios.com
You can get the most common pre-installed plugins from http://nagiosplugins.org/ and others from the Exchange
http://exchange.nagios.com
Re: Remote commnad execution failed
Where do I install these plugin on the remote host? Which directory it should be installed in?
I presume I just need to copy these plugins on remote host without installing, correct?
Can I copy these plugins from the server monitoring host to remote host?
Thanks.
I presume I just need to copy these plugins on remote host without installing, correct?
Can I copy these plugins from the server monitoring host to remote host?
Thanks.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Remote commnad execution failed
These would need to be compiled on the remote host
Something like
Something like
Code: Select all
tar -xzf "nagios-plugins-1.4.15.tar.gz"
cd "nagios-plugins-1.4.15"
./configure
make clean
make
make installRe: Remote commnad execution failed
I successfully installed nagios plugins on remote host, however it's still complaining that "remote command execution failed: bash:/usr/local/nagios/libexec/*"
Do I need to restart anything on monitoring host to see it now?
Thanks.
Do I need to restart anything on monitoring host to see it now?
Thanks.
Re: Remote commnad execution failed
OK, let's try something simple. Run the following commands and post the output:
On your remote machine run in terminal:
On your nagios server run in terminal:
On your remote machine run in terminal:
Code: Select all
/usr/local/nagios/libexec/check_users -w 2 -c 5Code: Select all
su nagios
ssh nagios@<your_remote_machine_IP>Be sure to check out our Knowledgebase for helpful articles and solutions!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Remote commnad execution failed
Also, you need to make sure each of the items you are checking exist
The plugins info I gave you is for the basic plugins... On the remote host can you run:
The plugins info I gave you is for the basic plugins... On the remote host can you run:
Code: Select all
ls -l /usr/local/nagios/libexec/Re: Remote commnad execution failed
Both of these commands work fine!
Interestingly enough, root disk space check on remote host works and ping works, but check_load, check_log, nwstat give this error:
"Remote command execution failed: bash: /usr/local/nagios/libexec/check_load/: Not a directory"
I made sure that check_load plugin does exist on remote host in /libexec/
Also Check breeze complains that "Host name/address not specified"
Thanks.
Interestingly enough, root disk space check on remote host works and ping works, but check_load, check_log, nwstat give this error:
"Remote command execution failed: bash: /usr/local/nagios/libexec/check_load/: Not a directory"
I made sure that check_load plugin does exist on remote host in /libexec/
Also Check breeze complains that "Host name/address not specified"
Thanks.
Re: Remote commnad execution failed
Yes, all these plugins do exist on remote host in /libexec/
scottwilkerson wrote:Also, you need to make sure each of the items you are checking exist
The plugins info I gave you is for the basic plugins... On the remote host can you run:Code: Select all
ls -l /usr/local/nagios/libexec/
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Remote commnad execution failed
Looking back at your errors I can see the problem for most of them. One was an error we had in the defaults for the wizard, which was recently fixed and you can download the new wizard at
http://exchange.nagios.org/directory/Ad ... rd/details
and upload through Admin -> Manage Config Wizards
This fixes an erroneously placed / in the default check users command.
The others look to be a configuration problem when you set them up. For each command you need to provide all of the required args, for example you cannnot just enter
you would need to enter
the easiest way to make sure you have everything is to run them from the command line on the remote host to make sure you are getting the expected result. If you don't know what is required most can be run with the -h to get a help list.
Several of your commands have a trailing / which is not correct, ie. These are incorrect
And will need to be each edited in the Core Config Manager to remove the extra /
for the /usr/local/nagios/libexec/check_users you should edit it in the Core Config Manager
you likely have
but it should be
This one was the wizards fault..
http://exchange.nagios.org/directory/Ad ... rd/details
and upload through Admin -> Manage Config Wizards
This fixes an erroneously placed / in the default check users command.
The others look to be a configuration problem when you set them up. For each command you need to provide all of the required args, for example you cannnot just enter
Code: Select all
/usr/local/nagios/libexec/check_breeze Code: Select all
/usr/local/nagios/libexec/check_breeze -H 192.168.5.1 -w 80 -c 90Several of your commands have a trailing / which is not correct, ie. These are incorrect
Code: Select all
/usr/local/nagios/libexec/check_load/
/usr/local/nagios/libexec/check_log/
/usr/local/nagios/libexec/check_nwstat/
/usr/local/nagios/libexec/check_mrtg/
/usr/local/nagios/libexec/check_mrtgtraf/
for the /usr/local/nagios/libexec/check_users you should edit it in the Core Config Manager
you likely have
Code: Select all
/usr/local/nagios/libexec/check_users /Code: Select all
/usr/local/nagios/libexec/check_users