vCenter Monitong with vmware wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mjeya
Posts: 20
Joined: Wed Apr 25, 2012 11:21 am

vCenter Monitong with vmware wizard

Post by mjeya »

Hi,

I’ve used vmware wizard (http://exchange.nagios.org/directory/Ad ... rd/details) to configure the monitoring for vm-host/guest and it works great. I couldn’t use the same for vCenter monitoring, as there is no option to select vCenter from the wizard. I tried from command line. The help shows I can monitor the following for vCenter

DC specific :
* io - shows disk io info
+ aborted - aborted commands count
+ resets - bus resets count
+ kernel - kernel latency in ms
+ device - device latency in ms
+ queue - queue latency in ms
* vmfs - shows Datastore info
+ (name) - info for datastore with name (name)
^ all datastore info
* runtime - shows runtime info
+ list(vm) - list of VMWare machines and their statuses
+ listhost - list of VMWare esx host servers and their statuses
* recommendations - shows recommendations for cluster
+ (name) - recommendations for cluster with name (name)
^ all clusters recommendations

I’ve got outpuut for "io"
./check_esx3.pl -D <hostname> -f /usr/local/nagiosxi/etc/components/vmware/<host>_auth.txt -l io
ESX3 OK - io commands aborted=0, io bus resets=0, io read latency=0 ms, write latency=0 ms, kernel latency=0 ms, device latency=0 ms, queue latency=0 ms | io_aborted=0;; io_busresets=0;; io_read=0ms;; io_write=0ms;; io_kernel=0ms;; io_device=0ms;; io_queue=0ms;;

I’ve got the following error for "runtime" and "vmfs"
./check_esx3.pl -D <hostname> -f /usr/local/nagiosxi/etc/components/vmware/<host>_auth.txt -l runtime
ESX3 CRITICAL - Can't call method "val" on an undefined value at ./check_esx3.pl line 2462. | vmcount=40units;;

./check_esx3.pl -D <hostname> -f /usr/local/nagiosxi/etc/components/vmware/<host>_auth.txt -l vmfs
ESX3 CRITICAL - Can't use an undefined value as an ARRAY reference at ./check_esx3.pl line 2184.


I want to monitor all the data stores and the status of all vm hosts in the vCentre. May I know the recommended plugin to do this?

Thanks
Mukunthini
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: vCenter Monitong with vmware wizard

Post by lmiltchev »

I was not able to reproduce the issue. I ran all of these commands successfully against our vSphere server. Did you follow the steps outlined in our "Nagios XI - Monitoring VMware" document?
I couldn’t use the same for vCenter monitoring, as there is no option to select vCenter from the wizard.
You can modify the checks via the Core Config Manager by adding the "-D" flag.

You can try running the VMware ESX / vSphere / vCenter Monitoring Wizard, which is a 3rd party software and we cannot guarantee that it will work. There is a "vCenter" option that you can select in the wizard.

Note: If the SDK didn't install properly (or there are some other issues), this particular wizard may not work either, because it essentially uses the same plugin.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mjeya
Posts: 20
Joined: Wed Apr 25, 2012 11:21 am

Re: vCenter Monitong with vmware wizard

Post by mjeya »

Thanks alot for your guidance.

Yes I did follow the steps "Nagios XI - Monitoring VMware" document and successfully installed the wizard. But the wizard itself said that “Monitor a VMware host or guest VM”. And there are only 2 modes available in the monitoring wizard as below. And it worked well for both Host and guest
Monitoring Mode:

Would you like to monitor the VMware host (server) or a guest VM?
- Monitor the VMware host
- Monitor a guest VM on the VMWare host

Then I tried with command line with –D option for vCentre, runtime option worked with only subcommand as below,

./check_esx3.pl -D <hostname> -f /usr/local/nagiosxi/etc/components/vmware/<host>_auth.txt -l runtime
ESX3 CRITICAL - Can't call method "val" on an undefined value at ./check_esx3.pl line 2462. | vmcount=40units;;

./check_esx3.pl -D <hostname> -f /usr/local/nagiosxi/etc/components/vmware/<host>_auth.txt -l runtime -s list
ESX3 OK - 40/41 VMs up: ITS-Tracker-Qat(UP),......., Soy02(UP), Denis(UP), Speedtest(UP) | vmcount=40units;;

I have the same issue executing vmfs info,
./check_esx3.pl -D <hostname> -f /usr/local/nagiosxi/etc/components/vmware/<host>_auth.txt -l vmfs
ESX3 CRITICAL - Can't use an undefined value as an ARRAY reference at ./check_esx3.pl line 2184.

Do I need to provide the data-store name as subcommand? What is the subcommand option to see all the datastore info?

Thanks
Mukunthini
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: vCenter Monitong with vmware wizard

Post by scottwilkerson »

What version of vCenter do you have?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mjeya
Posts: 20
Joined: Wed Apr 25, 2012 11:21 am

Re: vCenter Monitong with vmware wizard

Post by mjeya »

Vmware vCenter version 4.1.0

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: vCenter Monitong with vmware wizard

Post by scottwilkerson »

Hmm, it appears that the installed API isn't returning all of the fields.

Did you get any errors when installing the SDK?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mjeya
Posts: 20
Joined: Wed Apr 25, 2012 11:21 am

Re: vCenter Monitong with vmware wizard

Post by mjeya »

During the installation, initially it was complained lack of Perl modules. I have installed/upgraded necessary Perl modules from cpan. When I tried again it went smoothly, output as below.
========================================================================================================================
# ./vmware-install.pl
Do you accept? (yes/no) yes
Thank you.
In which directory do you want to install the executable files?
[/usr/bin]
Please wait while copying vSphere CLI files...

The installation of vSphere CLI 5.0.0 build-422456 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
"/usr/bin/vmware-uninstall-vSphere-CLI.pl".
This installer has successfully installed both vSphere CLI and the vSphere SDK for Perl.
Enjoy,
=================================================================================================================
Regards,
Mukunthini
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: vCenter Monitong with vmware wizard

Post by benningtonr »

I am trying to copy over the sdk files with no success, how do I do this?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: vCenter Monitong with vmware wizard

Post by scottwilkerson »

benningtonr wrote:I am trying to copy over the sdk files with no success, how do I do this?
Are you trying to get them TO the Nagios Server? You can use secure FTP such as filezilla, or WinSCP

Looking at this again, I believe that the API may be different for vCenter and vSphere and using the commands without specifying subcommand.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Still having problems with VMWare

Post by benningtonr »

I have followed the directions and I still get the same results

whrovcenter1 CPU Usage for VMHost Critical 3m 39s 4/5 2012-07-24 11:51:32 (null)
Datastore usage for VMHost Critical 2m 24s 3/5 2012-07-24 11:51:47 (null)
Input / Output for VMHost Critical 6m 8s 5/5 2012-07-24 11:50:03 (null)
Memory for VMHost Critical 4m 53s 5/5 2012-07-24 11:51:18 (null)
Networking for VMHost Critical 3m 38s 4/5 2012-07-24 11:51:33 (null)
Services for VMHost Critical 2m 23s 3/5 2012-07-24 11:51:48 (null)
VM Status for VMHost Critical 6m 6s 5/5 2012-07-24 11:50:05 (null)
Locked