Page 2 of 3

Re: Problems with monitoring of VMware guest machines

Posted: Mon Dec 10, 2012 1:38 pm
by Bojikravov
Did what you told me...but I get same result.

Re: Problems with monitoring of VMware guest machines

Posted: Mon Dec 10, 2012 1:57 pm
by scottwilkerson
Can you run the following from the commandline replacing IPADDRESS, USERNAME, PASSWORD with your vmware credentials

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H IPADDRESS -u USERNAME -p PASSWORD
If you get errors, please post them back to the thread, you should get a list of guest VM's

Re: Problems with monitoring of VMware guest machines

Posted: Tue Dec 11, 2012 3:06 am
by Bojikravov
I receive very unexpected message

[root@localhost vmware-vsphere-cli-distrib]#

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H 192.168.250.2 -u root -p P@$$w0rd

Error: Cannot complete login due to an incorrect user name or password.

[root@localhost vmware-vsphere-cli-distrib]#
But that can't be true, because with same credentials I can add and monitor ESXi host.

Re: Problems with monitoring of VMware guest machines

Posted: Tue Dec 11, 2012 11:52 am
by lmiltchev
Is 192.168.250.2 the IP of your host or one of the guests?

Re: Problems with monitoring of VMware guest machines

Posted: Tue Dec 11, 2012 1:32 pm
by Bojikravov
192.168.250.2 is my ESXi host. Not a VM.

Re: Problems with monitoring of VMware guest machines

Posted: Tue Dec 11, 2012 2:56 pm
by scottwilkerson
With the $$ in the password you may need to escape them or put quotes around them

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H 192.168.250.2 -u root -p 'P@$$w0rd'
or

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H 192.168.250.2 -u root -p P@\$\$w0rd
You may need to do this in the Web UI as well

Re: Problems with monitoring of VMware guest machines

Posted: Wed Dec 12, 2012 10:13 am
by Bojikravov
OK, I execute

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H 192.168.250.2 -u root -p P@\$\$w0rd
and saw VM's on ESXi host in terminal.
When I enter my credential for ESXi Host [ P@\$\$w0rd ] in Nagios GUI I can see VM's list.
But when I choose to monitor one VM and finish the wizard in Views ->Service Detail I get this:
ESX3 CRITICAL - Error: Cannot complete login due to an incorrect user name or password.
So finally:
1. When I start Monitoring Wizard and enter my credentials
user: root
Password: P@$$w0rd
click on "Monitor the VMware host" and finish the wizard I can see and monitor ESXi host without problems
2. When I start Monitoring Wizard and enter my credentials
user: root
Password: P@\$\$w0rd
click on "Monitor a guest VM on the VMWare host" I can get a list of VM's, but I get Error of mistaken credentials.
I'm not so familiar with Linux, is there a problem with characters that I use in my passwords, because when I try to monitor LDAP Server I get "Could not bind to the ldap-server". User that I try to bind use "PA$$w0rD" for credential. I build a test lab with DC's and different type of machines and servers in this lab I'm using different instances of word "password"

Re: Problems with monitoring of VMware guest machines

Posted: Wed Dec 12, 2012 12:01 pm
by scottwilkerson
From here you will need to find the file in /usr/local/nagiosxi/etc/components/vmware/ and change the password back to P@$$w0rd

I am going to look into this wizard and see if we cam make some modification to allow for these types of passwords when running the wizard.

Re: Problems with monitoring of VMware guest machines

Posted: Wed Dec 12, 2012 1:22 pm
by Bojikravov
Yeap it works now !!! Thank you:)
Can you tell me why these problems occurs or link me article about using special characters in Nagios. I think it's normal and recommended to use complex passwords.
I told you that I got same problems with monitoring LDAP server.
I'm working in a agency with over 30 DC's, 300 servers (half of them VM's), SQL, Oracle DB's, LOTUS mail & etc. We are interested in Nagios.
Thank's again.

Re: Problems with monitoring of VMware guest machines

Posted: Thu Dec 13, 2012 6:00 pm
by scottwilkerson
I have modified the wizard to work correctly with $$ in password, you can install in through Admin -> Manage Config Wizards.