Page 1 of 2

VMware Monitoring with nagiosxi

Posted: Sat May 20, 2017 11:32 am
by Issac08
Hi All,

Without installing NS or NRPE clients on a vm machine whether it is possible to monitor the servers using vcenter . Any agent with plugin can be installed in vcenter to discover the esx hosts,virtual machines and data stores to enable monitoring .Kindly suggest. Need to discover all the servers in VMware data center.

Re: VMware Monitoring with nagiosxi

Posted: Sat May 20, 2017 11:38 am
by Issac08
Hope the below docs help me.. Confirm


https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: VMware Monitoring with nagiosxi

Posted: Sat May 20, 2017 2:09 pm
by 455157
Correct!

If you follow that doc, monitoring VMware is a piece of cake.

Once the SDK is installed (page 2) , you can run the VMware wizard, which will detect and show you all of the guests, and you can monitor host/guest CPU, memory, datastores, etc... on host and guests.

No agent needed for those basic metrics, is nice.

Re: VMware Monitoring with nagiosxi

Posted: Mon May 22, 2017 12:13 pm
by Issac08
Need to monitor using vcenter it is possible right ? ..I cant able to see the vm and esxi servers

Re: VMware Monitoring with nagiosxi

Posted: Mon May 22, 2017 1:27 pm
by tgriep
Did you install the VMWare Perl SDK package on to the Nagios Server?
Normally, when you run the Wizard, you would use a VCenter server to connect to your VMWare Infrastructure and after connecting to that server, you should be able to select the Hosts or Guests to monitoring.
Are you getting any errors when you run the Wizard?
Can you screen capture the issue you are seeing and post it here?

Re: VMware Monitoring with nagiosxi

Posted: Mon May 22, 2017 11:11 pm
by Issac08
yes Vmware SDK has been installed.


"Error: Cannot complete login due to an incorrect user name or password." But i can able to login using the same credentials
manually .I am using vcenter Ip to connect.

Re: VMware Monitoring with nagiosxi

Posted: Tue May 23, 2017 12:02 am
by Issac08
when i tried to connect a esxi host from nagiosxi i am getting the below error


Error connecting to server at 'https://<IP address>/sdk/webService': Perhaps host is not a vCenter or ESX server

Re: VMware Monitoring with nagiosxi

Posted: Tue May 23, 2017 9:45 am
by tgriep
Try using the root login to the vcenter server to see if the plugin is working.
If the login to the server setup to use an Active Directory account, put in the username in the following format
domain/username

See it that works for you as well.

You can also troubleshoot the connection to the VMWare system by logging in to the Nagios server as root and run the following.

Change to the following directory

Code: Select all

cd /usr/lib/vmware-vcli/apps/general
Run this to test to see if you can connect to the VMWare VCenter server

Code: Select all

./connect.pl --url https://xxx.xxx.xxx.xxx/sdk/vimService --username <username> --password <password>
If the above passes, go to this directory.

Code: Select all

cd /usr/lib/vmware-vcli/apps/host
Run this to test to see if you can get the list of hosts connected to the VMWare VCenter server

Code: Select all

./hostinfo.pl --url https://xxx.xxx.xxx.xxx/sdk/vimService --username <username> --password <password>
Display the VM Guests running on the system

Code: Select all

cd /usr/lib/vmware-vcli/apps/vm
./vminfo.pl --url https://xxx.xxx.xxx.xxx/sdk/vimService --username <username> --password <password>
Post the output if there are any errors.

Re: VMware Monitoring with nagiosxi

Posted: Wed May 24, 2017 9:18 am
by Issac08
Hello Mate ,

Now i can able to connect and view the esxi and vm's.

But if i connect through console i can see only the VM,s are getting discovered. not able to view ESXI and datastores

Re: VMware Monitoring with nagiosxi

Posted: Wed May 24, 2017 1:01 pm
by tgriep
Can you provide a screen capture of the error so I can view the command you are running to generate the error?
Does the user that you are using have sufficient rights to view the ESXi servers and Datastores?