ESX issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

ESX issue

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: ESX issue

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: ESX issue

Post 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;;
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: ESX issue

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: ESX issue

Post 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));
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: ESX issue

Post 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)); }
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: ESX issue

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: ESX issue

Post 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.
Former Nagios Employee
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: ESX issue

Post by raamardhani7 »

I am sorry for the delay in response. you can close this thread. thank you so much your help :)
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: ESX issue

Post by mcapra »

Closing this!
Former Nagios employee
https://www.mcapra.com/
Locked