Page 1 of 6

vCenter Monitong with vmware wizard

Posted: Fri Jul 13, 2012 8:20 am
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

Re: vCenter Monitong with vmware wizard

Posted: Fri Jul 13, 2012 10:59 am
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.

Re: vCenter Monitong with vmware wizard

Posted: Thu Jul 19, 2012 3:05 pm
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

Re: vCenter Monitong with vmware wizard

Posted: Thu Jul 19, 2012 4:18 pm
by scottwilkerson
What version of vCenter do you have?

Re: vCenter Monitong with vmware wizard

Posted: Fri Jul 20, 2012 8:48 am
by mjeya
Vmware vCenter version 4.1.0

Thanks

Re: vCenter Monitong with vmware wizard

Posted: Fri Jul 20, 2012 2:18 pm
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?

Re: vCenter Monitong with vmware wizard

Posted: Tue Jul 24, 2012 7:36 am
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

Re: vCenter Monitong with vmware wizard

Posted: Tue Jul 24, 2012 7:51 am
by benningtonr
I am trying to copy over the sdk files with no success, how do I do this?

Re: vCenter Monitong with vmware wizard

Posted: Tue Jul 24, 2012 9:23 am
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.

Still having problems with VMWare

Posted: Tue Jul 24, 2012 10:54 am
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)