nagios check_esx

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
martaf
Posts: 2
Joined: Wed Dec 18, 2013 10:48 am

nagios check_esx

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagios check_esx

Post 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.
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.
martaf
Posts: 2
Joined: Wed Dec 18, 2013 10:48 am

Re: nagios check_esx

Post 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:)
Attachments
check_esx.txt
the full check
(85.28 KiB) Downloaded 343 times
Last edited by sreinhardt on Thu Dec 19, 2013 3:36 pm, edited 1 time in total.
Reason: removed password
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios check_esx

Post by slansing »

Have you tried this with check_esx3? It is more up to date:

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