We are facing the below issue when running the check for DataStorage Usage For VMHost.
Code: Select all
ESX3 CRITICAL - Illegal division by zero at /usr/local/nagios/libexec/check_esx3.pl line 1065.
Code: Select all
ESX3 CRITICAL - Illegal division by zero at /usr/local/nagios/libexec/check_esx3.pl line 1065.
Code: Select all
grep "VERSION =" /usr/local/nagios/libexec/check_esx3.plHi,lmiltchev wrote:Have you made any changes to the esx server, specifically DataStore, mount points, or disk related? I've seen the same error in the past, and it turned out a datastore had been disconnected...
What is the version of the "check_esx3.pl" plugin that you are currently using?Can you show us the actual command run from the command line along with the output of it?Code: Select all
grep "VERSION =" /usr/local/nagios/libexec/check_esx3.pl
Code: Select all
grep "VERSION =" /usr/local/nagios/libexec/check_esx3.pl
$VERSION = '0.2.0';
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl -H "aa.aa.aa.aa" -f "/usr/local/nagiosxi/etc/components/vmware/aa.aa.aa.aa_auth.txt" -l "VMFS"
ESX3 CRITICAL - Illegal division by zero at /usr/local/nagios/libexec/check_esx3.pl line 1065. | 'LUN 125'=800617.00MB;; 'LUN 122'=468856.00MB;; 'LUN 56'=214618.00MB;; 'LUN 55'=248267.00MB;; 'LUN 54'=291548.00MB;; 'LUN 45'=370614.00MB;; 'LUN 43'=195165.00MB;; 'LUN 42'=406468.00MB;; 'LUN 40'=802362.00MB;; 'LUN 32'=308103.00MB;; 'LUN 31'=334369.00MB;; 'LUN 75'=346800.00MB;; 'LUN 13'=31982.00MB;; 'LUN 11'=323712.00MB;;
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl -H "xx.xx.xx.xx" -f "/usr/local/nagiosxi/etc/components/vmware/xx.xx.xx.xx_auth.txt" -l "VMFS"
ESX3 OK - storages : FC_IBM_LUN_0002=548407.00 MB (52.31%), FC_IBM_LUN_0001=439590.00 MB (20.96%), FC_IBM_LUN_0000=758005.00 MB (36.15%) | FC_IBM_LUN_0002=548407.00MB;; FC_IBM_LUN_0001=439590.00MB;; FC_IBM_LUN_0000=758005.00MB;;
Hi Box293,Box293 wrote:I know that the check_esx3.pl script has a few bugs and needs updating to fix that problem. The developers have now called it check_vmware_api
It can be downloaded from here:
http://git.op5.org/gitweb?p=system-addo ... ;a=summary
I believe you can just rename it to check_esx3.pl and it should slot right in and fix your problem.
Code: Select all
/usr/local/nagios/libexec/check_esx_test.pl -H "xx.xx.xx.xx" -f "/usr/local/nagiosxi/etc/components/vmware/xx.xx.xx.xx_auth.txt" -l "RUNTIME"
Use of uninitialized value $subcommand in string ne at /usr/local/nagios/libexec/check_esx_test.pl line 1898.
CHECK_ESX_TEST.PL OK - 21/30 VMs up, overall status=green, connection state=connected, maintenance=no, All 310 health checks are Green, no config issues | vmcount=21units;; health_issues=0;; config_issues=0;;
Code: Select all
die {msg => ("NOTICE: \"" . $host_view->name . "\" is in maintenance mode, check skipped\n"), code => OK} if (($subcommand ne "MAINTENANCE") && ($runtime->inMaintenanceMode));
Code: Select all
if (defined($subcommand)) { die {msg => ("NOTICE: \"" . $host_view->name . "\" is in maintenance mode, check skipped\n"), code => OK} if (($subcommand ne "MAINTENANCE") && ($runtime->inMaintenanceMode)); }Box293, you are just amazing. this is working fine.Box293 wrote:Try replacing line 1898 with:
Code: Select all
if (defined($subcommand)) { die {msg => ("NOTICE: \"" . $host_view->name . "\" is in maintenance mode, check skipped\n"), code => OK} if (($subcommand ne "MAINTENANCE") && ($runtime->inMaintenanceMode)); }
I imagine you could probably setup a check_by_ssh to do so, though.CPU usage
Memory usage
I/O read latency
I/O write latency
Runtime health
Rnutime issues
Runtime status