|
ALL,
Here are some suggestion & some fixes, that I've applied at my site:
Add: $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; at the beggining (Yannick already suggest that).
Add: my($PERL_) = "/usr/bin/perl"; # perl location my($SCRIPT_) = "/nagios/Plugin/current/libexec/check_vmware.pl"; # my central script location, used by Nagios and change lines (MRTG section) from: Target[$hostobj-res-vm]: `check_vmware.pl ...... To: Target[$hostobj-res-vm]: `$PERL_ $SCRIPT_ ...... Reason: When I run the MRTG using cron, I got error that the MRTG cannot find the script or perl, so the actual lines will be: Target[$hostobj-res-vm]: `/usr/bin/perl /nagios/Plugin/current/libexec/check_vmware.pl ..... and using setting in the beggining of the script, will allow to easily manipulate the script.
Change: $cmdopt = "--config=/usr/local/etc/vmware.cfg "; To: $cmdopt = "--config=".Opts::get_option('config')." "; Reason: I got several VCs here, with different users & password, by deafult the script always show /usr/local/etc/vmware.cfg, even if I've use the generate with different --config location
I'm also sugest changing: PageTop[$hostobj--vm-actv]: null To: PageTop[$hostobj--vm-actv]: <h1> $hostobj Active Guests </h1> Which will show, as header, the guest name
Another suggestion: 1. generate from list of servers (what I've done is to ">>" the output using script that take a list of ESX servers) 2. generate the list of only desire checking (like - only memory, only cpu, only status of machine)
Just for the info - In my small network, I use MRTG to monitor VC environment with ~120 ESX servers, each server got 8-16 VMs (windows & linux) (cron, every 4 hours, since it takes several minutes for each check) I also use MRTG to monitor ~60 switches, some windows & linux machine (your template) & APC UPS (your template) (cron, every 5 minutes) I use Nagios with Kannel (sms), to monitor exta ~100 servers & services with notification.
Moshe
|