ESX Plugin check_esxi3 vmfs status null
Posted: Wed Jan 02, 2013 4:12 pm
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:
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?

/var/log/nagios3/nagios.log entries:
/var/log/nagios3/nagios.debug:
/tmp/nagios_debug.log (from the check_debug.sh plugin)
I added the following to config.d/commands.cfg:
And the service added to services.cfg:
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;90Would that cause the problem?
/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)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)
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: 0Code: 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$:”"
}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
}