Monitor Vmware ESX

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
giancarlob
Posts: 2
Joined: Sat Feb 13, 2010 5:25 pm

Post by giancarlob »

That sounds like installation problem but I don't know Fedora and my experience with VMware perl toolkit is very poor.

You could try this to compile toolkit:
cd vmware-vsphere-cli-distrib/
perl Makefile.PL
make install

Let me know,
good luck !

Giancarlo
ottow
Posts: 17
Joined: Mon Oct 12, 2009 6:59 am

Post by ottow »

Hey, thank you very much Giancarlo!
Running the compile by hand gave me a couple of error messages saying that some required modules where missing.
I installed the modules via CPAN and re-ran the SDK installer, and am now able to execute the check_esx3.pl script.

Thanks again for your help.
Now I just need to get the Cacti part working... ;-)

/Otto
ottow
Posts: 17
Joined: Mon Oct 12, 2009 6:59 am

Post by ottow »

Ok, I have it working now, and am able to graph CPU, Memory and Network load on ESXi and ESX vSphere hosts.
However, IO load doesn't work.
Seems this is because the check_esx3.pl can't pull the data for IO from the host (or VM, makes no difference whiuch I use).

Giancarlo, wopuld it be possible for you to post the check_esx3.pl script you used on your webpage? I suspect the one I have is buggy.

Thanks,

Otto
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

this scripting seems like the thing I'm looking for, but I get the following error when I try to run esxiograph.sh;

Code: Select all

/usr/share/cacti/site/scripts# bash esxiograph.sh io_vs ipaddress bla username password
Can't open perl script "/usr/share/cacti/site/scripts/check_esx3.pl": No such file or directory
I've searched the web for this perl script, but all versions I encounter use a Nagios module (e.g. "use Nagios::Plugin;"). Since we're not using nagios, is there an easy way to get this to work?

(error with the check_esx3.pl on the server)

Code: Select all

esxiograph.sh io_vs ipaddress bla user password
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/cacti/site/scripts/check_esx3.pl line 6.
BEGIN failed--compilation aborted at /usr/share/cacti/site/scripts/check_esx3.pl line 6.
read_latency: write_latency: kernel_latency: device_latency: queue_latency:
ottow
Posts: 17
Joined: Mon Oct 12, 2009 6:59 am

Post by ottow »

check_esx3.pl can be downloaded from here:
http://www.op5.org/community/projects/op5-plugins

However, as I said above I am having issues with the IO output beeing blank (all zeros) with this script.
MEM, CPU and NET works fine.

/Otto
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

That is the one I'm currently trying to use, but it gives me this error.

Code: Select all

Can't locate Nagios/Plugin.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/cacti/site/scripts/check_esx3.pl line 6.
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

ah.. I managed to install the CPAN nagios library. Now I'm not receiving any errors anymore.

but I'm not receiving any output as well, except for these:

Code: Select all

usage:VMware::VIRuntime.
or

Code: Select all

read_latency:Infrastructure write_latency:Toolkit', kernel_latency:http://www.vmware.com/download/sdk/ device_latency:latest queue_latency:latest
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

I'm getting there.
needed to install the SDK. Done that.
also needed to add 2 more Perl modules, done that as well.

Now I get this message:

Code: Select all

CHECK_ESX3.PL CRITICAL - Error: Server version unavailable at 'https://IPADDRESS/sdk/vimService.wsdl'
When I retrieve the wsdl from the server at the stated address i get:

Code: Select all

<!-- Copyright 2005-2009 VMware, Inc. All rights reserved. -->
<definitions targetNamespace="urn:vim25Service" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:interface="urn:vim25">
<import location="vim.wsdl" namespace="urn:vim25"/>
<service name="VimService">
<port binding="interface:VimBinding" name="VimPort">
<soap:address location="https://localhost/sdk/vimService"/>
</port>
</service>
</definitions>
(btw it is vsphere 4)
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

I've got it.

The CPAN modules debian provides are a bit older than the once that are required and the ones that are required wouldn't install using CPAN.

I needed to manually make the CPAN modules. Now I do get output from the scripts..

Only IO gives all zero values. CPU and MEM for example work great
ottow
Posts: 17
Joined: Mon Oct 12, 2009 6:59 am

Post by ottow »

Nice to see you got it working!
Regarding the IO figures beeing 0 or close to 0, the fedback I have gotten on the op5 Users mailing list concerning this is that these figures should be compared to what you are seeing in Virtual Center.
Remember the figures are snapshot measurements of the current activity, so they may very well be very low at just that moment the script was executed.
The numbers are for all HBAs, and in my case what I am seeing in Virtual Center compares fairly well with the script output.

I have however found another issue which causes problems in Cacti; When executing the check_esx3.pl script my CPU load jumps to 100% on all cores on my Cacti server.
10 VMware hosts, 4 graphs each and 1 minute poller interval pretty much overloads my server... Not even setting poller interval to 5 minutes solves the issue, each instance of check_esx3.pl takes 5-7seconds to execute.

Otto
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

yes.. the IO graphs are working fine (sorry for the late reply, but I was gone skiing last week). The nightly maintenance (like performing backups) is visible on the IO graph.

Would be a nice addition if the script can graph per datastore.

I can't say anything regarding the CPU resources, apparently I disabled the cacti-server in the hosts section :oops:

I've reenabled it, so I'll let you know if I've got the same thing. (We're using the 5 minute poller interval btw)

*edit: I'm not seeing much difference in CPU usage/load.
we're using it to monitor the vCenter server with 5 hosts. Which means only 3 graphs (I'm still in testing mode :) )
Throbulator
Posts: 15
Joined: Mon Sep 29, 2008 9:09 am

SNMP?

Post by Throbulator »

This thread appears to have split into two directions: SNMP and some perl script. Is anyone successfully pulling SNMP data from VMWare?
feolener
Posts: 7
Joined: Wed Feb 17, 2010 5:47 am

Post by feolener »

No, I am successful in retrieving the basic machine SNMP info (like network traffic etc, but not the VMWare ESX specific stuff)
Alphadog
Posts: 38
Joined: Tue Aug 04, 2009 12:58 am
Location: Bavaria near Germany

ESX 4.0

Post by Alphadog »

Hey guys I have managed it to get snmp data from my esx host but in cacti i cant see any data ...

Could it be that they've changed the OID's ?
Alphadog
Posts: 38
Joined: Tue Aug 04, 2009 12:58 am
Location: Bavaria near Germany

ESX 4 MIBS ?

Post by Alphadog »

Could anyone send me the MIB files of the Vsphere ?? I dont have acces to them because the licences havent arrived yet ...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest