Box293_VMware Virtualization Wizard Problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
maykschwarze
Posts: 2
Joined: Tue Jan 14, 2014 2:42 am

Box293_VMware Virtualization Wizard Problem

Post by maykschwarze »

Hi,

i try to install VMware vMA Settings Manager but get stuck with an error message. When i test the ssh configuration the webinterface shows:
Host key verification failed.
In SSH Terminal everything is fine. If i start
/usr/local/nagios/libexec/check_by_ssh -E -H xxx.xxx.xxx.xx -C "~/box293_check_vmware.pl --server virtual_center_server --check vCenter_Name_Version" --logname=vi-admin -t 30
The answer is correct:
OK: VMware vCenter Server 5.5.0 Build-1945274
without asking for credentials.

I'm stuck can anybody help me?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Box293_VMware Virtualization Wizard Problem

Post by tgriep »

When check commands are run in the UI, they are run as the user nagios.

Can you login as nagios and rerun the command?

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_by_ssh -E -H xxx.xxx.xxx.xx -C "~/box293_check_vmware.pl --server virtual_center_server --check vCenter_Name_Version" --logname=vi-admin -t 30
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Box293_VMware Virtualization Wizard Problem

Post by Box293 »

vMA Settings manager is a little different as it runs at the apache user not nagios (but the nagios user is used for the checks).

In the steps below,
10.XXX.XXX.XXX = vMA host
10.ZZZ.ZZZ.ZZZ = vCenter server

Try these commands and post back the results please:
The following commands will be done as the nagios user

Code: Select all

su nagios
Does this command prompt you for credentials?
If you do login or are not prompted for credentials, type exit so end the SSH session and return to the nagios host.

Does this command prompt you for credentials, what is the output?

Code: Select all

/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 10.XXX.XXX.XXX -C '~/box293_check_vmware.pl --server 10.ZZZ.ZZZ.ZZZ --version'
We'll stop being the nagios user now, type exit

The following commands will be done as the apache user:

Code: Select all

su -s /bin/sh apache
Does this command prompt you for credentials?
If you do login or are not prompted for credentials, type exit so end the SSH session and return to the nagios host.

Does this command prompt you for credentials, what is the output?

Code: Select all

/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 10.XXX.XXX.XXX -C '~/box293_check_vmware.pl --server 10.ZZZ.ZZZ.ZZZ --version'
Also, provide the output from these commands:

Code: Select all

ls -al /var/www/

ls -al /var/www/.ssh/
Do these commands produce output? Don't post the output here.

Code: Select all

cat /var/www/.ssh/id_dsa

cat /var/www/.ssh/known_hosts
We'll stop being the apache user now, type exit

Also, what version of check_by_ssh do you have?

Code: Select all

/usr/local/nagios/libexec/check_by_ssh -V
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
maykschwarze
Posts: 2
Joined: Tue Jan 14, 2014 2:42 am

Re: Box293_VMware Virtualization Wizard Problem

Post by maykschwarze »

Hi Box293,

i hoped you would reply. Thanks a lot!

I nailed the problem.

Code: Select all

su -s /bin/sh apache
Does this command prompt you for credentials?
it came back with:

Code: Select all

The authenticity of host '10.xxx.xxx.xxx (10.xxx.xxx.xxx)' can't be established.
ECDSA key fingerprint is lalalalala.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/usr/share/httpd/.ssh/known_hosts).
i reseted the permissions and
Welcome to vSphere Management Assistant
Now all checks are woring fine.
Thanks a lot man!!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Box293_VMware Virtualization Wizard Problem

Post by lmiltchev »

I am glad your issue has been resolved! I am locking this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked