ESX Plugin check_esxi3 vmfs status null

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
indy500
Posts: 4
Joined: Thu Sep 27, 2012 10:23 am

ESX Plugin check_esxi3 vmfs status null

Post by indy500 »

I have installed the VMware SDK for PERL 5.1 and am attempting to monitor the host storage with the plugin from the Nagios Exchange (http://www.op5.com/how-to/monitoring-vm ... er-server/).

From the command-line the output seems OK:

Code: Select all

indy-as-l-11:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_esx3-0.5.pl -u nagios -p mypass -H indy-rvs-e-01 -l vmfs -s datastore2 -w 80% -c 90%
     
CHECK_ESX3-0.5.PL OK - Storages : datastore2=26261.00 MB (4.73%) | datastore2=4.73%;80;90
When the same command is run by Nagios, in "Service State Information", "Current Status" shows correctly (OK,WARNING, or CRITICAL), however the "Status Information" shows "null" rather than the details. The only thing I notice different about the output from other plugins are spaces on either side of the pipe symbol.

Would that cause the problem?

Image
/var/log/nagios3/nagios.log entries:

Code: Select all

[1357228890] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;vmware_host_1;VMware VMFS main-storage;1357228888
[1357228894] SERVICE ALERT: vmware_host_1;VMware VMFS main-storage;CRITICAL;SOFT;1;(null)
/var/log/nagios3/nagios.debug:

Code: Select all

[1357228890.142607] [016.0] [pid=32354] Scheduling a forced, active check of service 'VMware VMFS main-storage' on host 'vmware_host_1' @ Thu Jan  3 11:01:28 2013
[1357228890.392796] [016.0] [pid=32354] Attempting to run scheduled check of service 'VMware VMFS main-storage' on host 'vmware_host_1': check options=1, latency=2.392000
[1357228890.392842] [016.0] [pid=32354] Checking service 'VMware VMFS main-storage' on host 'vmware_host_1'...
[1357228890.393018] [016.1] [pid=32354] Check result output will be written to '/var/lib/nagios3/spool/checkresults/checkYwln3e' (fd=7)
/tmp/nagios_debug.log (from the check_debug.sh plugin)

Code: Select all

Thu Jan 3 10:56:27 EST 2013 /usr/lib/nagios/plugins/check_esx3-0.5.pl -u nagios -p readonly -H crml-vs-e-01 -l vmfs -o 'used,breif' -w 80% -c 90%
CHECK_ESX3-0.5.PL OK - Storages : datastore1=329761.00 MB (79.86%) | datastore1=79.86%;80;90
Exit code: 0
I added the following to config.d/commands.cfg:

Code: Select all

define command{
        command_name    check_esx_storage
        command_line    $USER1$/check_debug.sh "PERL_LWP_SSL_VERIFY_HOSTNAME=0;$USER1$/check_esx3 -H $HOSTADDRESS$ -u $USER3$ -p $USER4$ -l vmfs -s $ARG1$ -w “$ARG2$:” -c “$ARG3$:”"
}
And the service added to services.cfg:

Code: Select all

define service {
       hostgroup_name                  vmware-hosts
       service_description             vmware_storage
       check_command                   check_esx_storage!datastore1!70%:!90%:
       use                             generic-service
       notification_interval           15
}
Attachments
Selection_010.png
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: ESX Plugin check_esxi3 vmfs status null

Post by sreinhardt »

It appears that after your check, per the first code block above, that your plugin is returning an empty line first and that is why you are getting a null value. It appears that they upgraded to .5 at some point, and that may be causing the issue. You might try to find the original revision without a version number.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
indy500
Posts: 4
Joined: Thu Sep 27, 2012 10:23 am

Re: ESX Plugin check_esxi3 vmfs status null

Post by indy500 »

Thanks for the reply, however that line was inserted by me to make it readable in the post. The plugin does in fact return only a single line (see the nagios_debug log output) from the server's perspective.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ESX Plugin check_esxi3 vmfs status null

Post by abrist »

Was this ever resolved?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked