I'm evaluating Nagios XI and found an issue attemtpting run the following service command. I'm using the VMWARE version.
$USER1$/check_by_ssh -H $HOSTADDRESS$ $ARG1$ $ARG2$
$ARG1 = -C "/usr/local/nagios/libexec/check_users -w 1 -c 2"
My first error, not certain why Nagios XI is goign to the www directory, the documentation "Nagios XI – Monitoring Hosts Using SSH" didn't have this as part of the setup.
OUTPUT: Remote command execution failed: Could not create directory '/var/www/.ssh'.
I created the .ssh directory on nagios server and gave nagios group access.
Now getting error when I run the test using "Test Check Command" from Service properties page.
NAGIOS XI OUTPUT: Remote command execution failed: Host key verification failed.
Copied certs to /var/www/.ssh and gave nagios group rw access
Now getting error:
NAGIOS XI OUTPUT: Remote command execution failed: Permission denied, please try again.
I am able to run the command from the Nagios server command line, so my ssh certs are good.
COMMAND LINE OUTPUT:
[nagios@testserver libexec]$ ./check_by_ssh -H insight-test -C "/usr/local/nagios/libexec/check_users -w 1 -c 2"
USERS WARNING - 1 users currently logged in |users=1;1;2;0
Thx,
Don
SSH-Proxy - command not working in Nagios XI
-
[email protected]
- Posts: 12
- Joined: Wed Feb 06, 2013 9:20 am
-
[email protected]
- Posts: 12
- Joined: Wed Feb 06, 2013 9:20 am
Re: SSH-Proxy - command not working in Nagios XI
Update, I found that the service is actually working. I can see the warning from the service list. It appears the issue is with the "Test Check Command" is giving the error. The Test Check Command must be doing some extra stuff in the background. It's a great tool and have used it now serveral times to troubleshoot other commands. Not sure why this one breaks with the check_by_ssh command and that I need to additional permissions, but not sure where at this point? I believe it must be something to do with the addtional directories and files that the check_by_ssh command appeared to hit from my last post (/var/www/.ssh)
Still getting the error:
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_by_ssh -H insight-test -C "/usr/local/nagios/libexec/check_users -w 1 -c 2"
OUTPUT: Remote command execution failed: Permission denied, please try again.
Thx,
Don
Still getting the error:
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_by_ssh -H insight-test -C "/usr/local/nagios/libexec/check_users -w 1 -c 2"
OUTPUT: Remote command execution failed: Permission denied, please try again.
Thx,
Don
Re: SSH-Proxy - command not working in Nagios XI
This very strange. The ssh keys should reside in the nagios home directory (/home/nagios/.ssh).
The test check command is not as robust as the standard checks as some macros will not be passed to it. It is usually better for the more advanced checks to test them from the cli.
The test check command is not as robust as the standard checks as some macros will not be passed to it. It is usually better for the more advanced checks to test them from the cli.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
[email protected]
- Posts: 12
- Joined: Wed Feb 06, 2013 9:20 am
Re: SSH-Proxy - command not working in Nagios XI
Yes, that was what I as thinking, as well. I do have the certs in /home/nagios/.ssh. Runing the commands from the cli did show that it was setup correctly. Thank you very much for the update and I will do as you recommended.
Thanks again!
Don
Thanks again!
Don