Page 1 of 2
Issue Establishing SSH Session With vMA Host
Posted: Thu Feb 21, 2019 6:27 pm
by hillhealthcenter
Hi,
I'm having trouble getting the box293_check_vmware plugin wizard to connect to the vMA host. Troy Lea helped me to restore the check functionality. (Cheers, Troy!) The checks themselves are working brilliantly. However, what remains is to get the wizard to connect with the vMA, mostly for possible future use.
Here's what I get from the VMware vMA Settings Manager test:
--------------
Test Results
There was an issue establishing an SSH session with the vMA host xxx.xxx.xxx.xxx!
The output is as follows:
Please refer to the box293_check_vmware manual on how to configure this Nagios host to communicate with the vMA host.
Re: Issue Establishing SSH Session With vMA Host
Posted: Fri Feb 22, 2019 2:33 pm
by ssax
Please run this tail command (and leave it running):
Code: Select all
tail -F /var/log//httpd/error_log /var/log/httpd/ssl_error_log
Then click the Test button again and send us any output from the command above after it fails.
Additionally, once you've done that, please SSH into the vMA appliance and check
/var/log/messages and
/var/log/secure to see if you see any error messages that may be related.
Thank you
Re: Issue Establishing SSH Session With vMA Host
Posted: Fri Feb 22, 2019 3:20 pm
by hillhealthcenter
...strange. no output.
Re: Issue Establishing SSH Session With vMA Host
Posted: Fri Feb 22, 2019 3:41 pm
by ssax
It doesn't necessarily mean there should be any output.
Are you using IP address or DNS name in the vMA Host Address input box?
Does the ping test succeed?
I'll look at the code and see what I can find.
Re: Issue Establishing SSH Session With vMA Host
Posted: Fri Feb 22, 2019 4:02 pm
by hillhealthcenter
I'm using IP address and ping is successful.
Re: Issue Establishing SSH Session With vMA Host
Posted: Mon Feb 25, 2019 4:35 pm
by tgriep
The VMware vMA Settings Manager test runs as the Apache User from the XI GUI so there are aditional steps needed to get that to work.
Establish an SSH session to this Nagios XI host as user root
Type mkdir /var/www/.ssh and press Enter
Type cp /home/nagios/.ssh/known_hosts /var/www/.ssh/ and press Enter
Type cp /home/nagios/.ssh/id_dsa /var/www/.ssh/ and press Enter
Type setfacl -R -m u:apache:r-x /var/www/.ssh/ and press Enter
Type exit and press Enter
That will setup the Apache user with the same SSH settings as the nagios user and that should fix the test in the XI GUI vMA manager menu.
Re: Issue Establishing SSH Session With vMA Host
Posted: Mon Feb 25, 2019 4:52 pm
by hillhealthcenter
I entered the commands again. Here are the results:
Last login: Fri Feb 22 16:47:55 2019 from
[root@nagiosxi ~]# mkdir /var/www/.ssh
mkdir: cannot create directory `/var/www/.ssh': File exists
[root@nagiosxi ~]# cp /home/nagios/.ssh/known_hosts /var/www/.ssh/
cp: overwrite `/var/www/.ssh/known_hosts'? y
[root@nagiosxi ~]# cp /home/nagios/.ssh/id_dsa /var/www/.ssh/
cp: overwrite `/var/www/.ssh/id_dsa'? y
[root@nagiosxi ~]# setfacl -R -m u:apache:r-x /var/www/.ssh/
[root@nagiosxi ~]#
Test Results
There was an issue establishing an SSH session with the vMA host 192.168.100.88!
The output is as follows:
Please refer to the box293_check_vmware manual on how to configure this Nagios host to communicate with the vMA host.
Re: Issue Establishing SSH Session With vMA Host
Posted: Mon Feb 25, 2019 5:26 pm
by tgriep
Do you see any errors in the Apache error logs when you run the test?
Look here for them
Go to the Nagios Exchange site at this link and open up the Manual.pdf file.
https://exchange.nagios.org/directory/P ... re/details
On page 11 are testing procedures to check the login credentials. The example shows to login as the nagios user "su nagios", use the Apache user instead to test the credentials. "su apache"
Post any errors that are generated.
Re: Issue Establishing SSH Session With vMA Host
Posted: Tue Feb 26, 2019 8:03 am
by hillhealthcenter
[root@nagiosxi ~]# su apache
This account is currently not available.
[root@nagiosxi ~]#
Re: Issue Establishing SSH Session With vMA Host
Posted: Tue Feb 26, 2019 12:18 pm
by tgriep
I keep forgetting that the Apache account is set for nologin.
Can you verify that the logins and credentials work while logged in as the nagios user?