Page 1 of 1

Box293_VMware Virtualization Wizard Problem

Posted: Thu Jan 22, 2015 6:54 am
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?

Re: Box293_VMware Virtualization Wizard Problem

Posted: Thu Jan 22, 2015 3:26 pm
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

Re: Box293_VMware Virtualization Wizard Problem

Posted: Thu Jan 22, 2015 3:49 pm
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

Re: Box293_VMware Virtualization Wizard Problem

Posted: Fri Jan 23, 2015 2:27 am
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!!

Re: Box293_VMware Virtualization Wizard Problem

Posted: Fri Jan 23, 2015 8:28 am
by lmiltchev
I am glad your issue has been resolved! I am locking this topic.