Issue Establishing SSH Session With vMA Host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Issue Establishing SSH Session With vMA Host

Post 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.
Thanks so much,
Tom
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue Establishing SSH Session With vMA Host

Post 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
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: Issue Establishing SSH Session With vMA Host

Post by hillhealthcenter »

...strange. no output.
Thanks so much,
Tom
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue Establishing SSH Session With vMA Host

Post 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.
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: Issue Establishing SSH Session With vMA Host

Post by hillhealthcenter »

I'm using IP address and ping is successful.
Thanks so much,
Tom
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Issue Establishing SSH Session With vMA Host

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: Issue Establishing SSH Session With vMA Host

Post 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.
Thanks so much,
Tom
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Issue Establishing SSH Session With vMA Host

Post by tgriep »

Do you see any errors in the Apache error logs when you run the test?
Look here for them

Code: Select all

/var/log/httpd
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: Issue Establishing SSH Session With vMA Host

Post by hillhealthcenter »

[root@nagiosxi ~]# su apache
This account is currently not available.
[root@nagiosxi ~]#
Thanks so much,
Tom
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Issue Establishing SSH Session With vMA Host

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked