Page 1 of 1

nagios check_esx

Posted: Wed Dec 18, 2013 11:46 am
by martaf
Hi,

I have a problem with "VMware Runtime Issues" in check_esx.
Nagios shows that:
CHECK_ESX CRITICAL - Can't call method "name" on an undefined value at /usr/local/nagios/libexec/check_esx line 1292.
So I checked this line and there is a piece of code:

elsif (uc($subcommand) eq "ISSUES")
{
my $issues = $host_view->configIssue;

if (defined($issues))
{
$output = '';
foreach (@$issues)
{
/*line 1292*/ $output .= $_->vm->name . ": " . $_->fu$
}
}
else
{
$res = 'OK';
$output = 'No config issues';
}
}

thanks for any help.

Re: nagios check_esx

Posted: Wed Dec 18, 2013 11:51 am
by abrist
Can you post the full service check and command definition? This error is usually due to a missing required field in the check.

Re: nagios check_esx

Posted: Thu Dec 19, 2013 9:42 am
by martaf
service definition:

Code: Select all

define service {
        use                     service
        hostgroup_name          ESXi Hypervisors
        service_description     VMware Runtime Issues
        check_command           check_esx_host_runtime_issues
        use                     generic-service
        }
command definition:

Code: Select all

define command{
  command_name check_esx_host_runtime_issues
  command_line /usr/bin/perl $USER1$/check_esx -H $HOSTADDRESS$ -u nagiosusr -p ********* -l runtime -s issues
 }
Thanks for answering my question:)

Re: nagios check_esx

Posted: Thu Dec 19, 2013 5:23 pm
by slansing
Have you tried this with check_esx3? It is more up to date:

http://exchange.nagios.org/directory/Pl ... st/details