Page 1 of 1
ESX issue
Posted: Thu May 12, 2016 9:17 am
by raamardhani7
Hi Team,
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.
Where as for other servers, this is working fine. but for few servers, this is not picking the details. Could someone help me here. thanks.
Re: ESX issue
Posted: Thu May 12, 2016 10:05 am
by lmiltchev
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?
Code: Select all
grep "VERSION =" /usr/local/nagios/libexec/check_esx3.pl
Can you show us the actual command run from the command line along with the output of it?
Re: ESX issue
Posted: Fri May 13, 2016 1:10 am
by raamardhani7
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?
Code: Select all
grep "VERSION =" /usr/local/nagios/libexec/check_esx3.pl
Can you show us the actual command run from the command line along with the output of it?
Hi,
Please find the update.
Code: Select all
grep "VERSION =" /usr/local/nagios/libexec/check_esx3.pl
$VERSION = '0.2.0';
Output of the command.
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;;
Below output is for the server which is working.
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;;
Re: ESX issue
Posted: Fri May 13, 2016 2:04 am
by Box293
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.
Re: ESX issue
Posted: Thu May 19, 2016 8:09 pm
by raamardhani7
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.
Hi Box293,
All the parameters except the below is working fine. Could you please help us here, thanks.
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));
Re: ESX issue
Posted: Thu May 19, 2016 11:16 pm
by Box293
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)); }
Re: ESX issue
Posted: Mon May 23, 2016 9:06 am
by raamardhani7
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)); }
Box293, you are just amazing. this is working fine.
one small request, we also need /tmp utilization data to be captured. can we achieve this for ESX servers?
Re: ESX issue
Posted: Mon May 23, 2016 3:38 pm
by rkennedy
Just to clarify - are you looking to monitor the /tmp directory on the local ESX machine? I don't think it'll be possible with the plugin as it mentions only being able to monitor the following -
CPU usage
Memory usage
I/O read latency
I/O write latency
Runtime health
Rnutime issues
Runtime status
I imagine you could probably setup a check_by_ssh to do so, though.
Re: ESX issue
Posted: Thu Jun 09, 2016 10:51 pm
by raamardhani7
I am sorry for the delay in response. you can close this thread. thank you so much your help

Re: ESX issue
Posted: Fri Jun 10, 2016 9:25 am
by mcapra
Closing this!