BETA BETA BETA BETA BETA BETAThis plugin, for both MRTG and Nagios, uses the VMware VI API to query the virtualcentre (or individual ESX hosts) to obtain information.
It can be somewhat resource intensive. You will need to install the Perl API packages (available from
http://www.vmware.com) and also SOAP::Lite and Class::MethodMaker.
Use the --help option to get a full list of available options.
It has a --generate option to generate the MRTG (or Nagios) configuration files required.
Try setting a configfile with the necessary information, then:
Code:
check_vmware.pl --mode=mrtg --guest=guestname --config=configfile --generate
check_vmware.pl --mode=mrtg --cluster=clustername --config=configfile --generate
Examples:Checking a particular guest CPU usage in MRTG
Code:
check_vmware.pl --config=vmconfig --report=cpu --mode=mrtg --guest=list
Checking all guest statuses in a cluster in Nagios and sending alerts via NSCA
Code:
check_vmware.pl --config=vmconfig --report=status --mode=nagios --nsca --nscastrip='.auckland.ac.nz' --nscaserver=nagios.auckland.ac.nz --tolower
Example configfile contents:
Code:
VI_PASSWORD=fjdkhfjksd
VI_SERVER=vcserver.auckland.ac.nz
VI_USERNAME=myusername