Monitoring of Data Store in VCenter

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Monitoring of Data Store in VCenter

Postby amitgupta19 » Thu Feb 15, 2018 10:30 am

Hi All,

I am trying to monitor the Datastore for the VCenter. But it is giving the following error:

CHECK_ESX3.PL CRITICAL - Can't use an undefined value as an ARRAY reference at /usr/lib/nagios/plugins/check_esx3.pl line 2999.

Can any one suggest the pointers ?
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: Monitoring of Data Store in VCenter

Postby kyang » Thu Feb 15, 2018 4:43 pm

What OS are you using?

What is the full command you are running to monitor the Datastore? What is the size?

Also what version of the check_esx3.pl plugin do you have?
Code: Select all
/usr/lib/nagios/plugins/check_esx3.pl -V
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
kyang
Support Tech
 
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm

Re: Monitoring of Data Store in VCenter

Postby amitgupta19 » Wed Mar 14, 2018 10:36 am

I only installed the NSClient++ on the VCenter.

Do i need to do any other steps for configuration, so that it works fine?

Do you have some defined steps which needs to be followed for configuring the monitoring?
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: Monitoring of Data Store in VCenter

Postby kyang » Thu Mar 15, 2018 10:40 am

Are you only looking to monitor Data Store?

There may be a plugin specifically for checking data store on our Nagios Exchange.
https://exchange.nagios.org/directory/P ... nts/VMWare

Otherwise, we do have a doc on monitoring VMware if you wanted to use the check_esx3.pl plugin. (It says Nagios XI, but Nagios Core would just be creating the checks manually)
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
kyang
Support Tech
 
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm

Re: Monitoring of Data Store in VCenter

Postby amitgupta19 » Thu Mar 15, 2018 11:07 am

@kyang : Thanks for the clarification.

I would like to inform you that, the Nagios Core setup that i am using is already monitoring the some VCenters.

But i don't know what was done to monitor the previous VCenters, as it was setup by our client.

Now i need to configure the monitoring for another VCenter.

Also Document does not guide about what changes i have to do on the Remote Host which needs to be monitored.

So i am looking for the steps which tells about what needs to be done on the remote host.
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: Monitoring of Data Store in VCenter

Postby kyang » Thu Mar 15, 2018 1:09 pm

Oh okay. Thanks for letting me know. Since you are already monitoring some VCenters, then no worries.

Back to your original post.

What version of the check_esx3.pl plugin are you on?

Code: Select all
/usr/lib/nagios/plugins/check_esx3.pl -V


CHECK_ESX3.PL CRITICAL - Can't use an undefined value as an ARRAY reference at /usr/lib/nagios/plugins/check_esx3.pl line 2999

Also, what is the command you are using when you received this error?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
kyang
Support Tech
 
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm

Re: Monitoring of Data Store in VCenter

Postby amitgupta19 » Fri Mar 16, 2018 6:36 am

@ kyang: version is as follows:

0.5.0
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: Monitoring of Data Store in VCenter

Postby scottwilkerson » Fri Mar 16, 2018 1:54 pm

kyang wrote:
CHECK_ESX3.PL CRITICAL - Can't use an undefined value as an ARRAY reference at /usr/lib/nagios/plugins/check_esx3.pl line 2999

Also, what is the command you are using when you received this error?


^^
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12594
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Monitoring of Data Store in VCenter

Postby amitgupta19 » Mon Mar 19, 2018 6:59 am

please find attached the screenshot attached for the command that i am using.
Attachments
VCenter-Command.JPG
Command for the VCenter
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: Monitoring of Data Store in VCenter

Postby mcapra » Tue Mar 20, 2018 7:11 pm

It looks as though the datacenter is not returning any datastores. The 0.7.1 version of the plugin seems to have added handling for this condition:
Code: Select all
sub dc_list_vm_volumes_info
{
   my ($np, $subcommand, $blacklist, $perc, $addopts) = @_;

   my $host_views = Vim::find_entity_views(view_type => 'HostSystem', properties => ['name', 'datastore']);
   die "Runtime error\n" if (!defined($host_views));
   die "Datacenter does not contain any hosts\n" if (!@$host_views);

   my @datastores;
   foreach my $host (@$host_views)
   {
      push(@datastores, @{$host->datastore});
   }
   return datastore_volumes_info(\@datastores, $np, $subcommand, $blacklist, $perc, $addopts);
}


You might try using the 0.7.1 version of the plugin, but as the underlying function only has additional handling to detect if no datastores are returned. You might double check the permissions of the user you are hitting esx with or make sure the -D argument your service definition is passing via $ARG1$ is correct.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3462
Joined: Thu May 05, 2016 3:54 pm

Next

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 18 guests