Problems with monitoring of VMware guest machines

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Bojikravov
Posts: 12
Joined: Wed Dec 05, 2012 9:45 am

Re: Problems with monitoring of VMware guest machines

Post by Bojikravov »

Did what you told me...but I get same result.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with monitoring of VMware guest machines

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bojikravov
Posts: 12
Joined: Wed Dec 05, 2012 9:45 am

Re: Problems with monitoring of VMware guest machines

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problems with monitoring of VMware guest machines

Post by lmiltchev »

Is 192.168.250.2 the IP of your host or one of the guests?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Bojikravov
Posts: 12
Joined: Wed Dec 05, 2012 9:45 am

Re: Problems with monitoring of VMware guest machines

Post by Bojikravov »

192.168.250.2 is my ESXi host. Not a VM.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with monitoring of VMware guest machines

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bojikravov
Posts: 12
Joined: Wed Dec 05, 2012 9:45 am

Re: Problems with monitoring of VMware guest machines

Post 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"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with monitoring of VMware guest machines

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bojikravov
Posts: 12
Joined: Wed Dec 05, 2012 9:45 am

Re: Problems with monitoring of VMware guest machines

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with monitoring of VMware guest machines

Post by scottwilkerson »

I have modified the wizard to work correctly with $$ in password, you can install in through Admin -> Manage Config Wizards.
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked