Monitoring of Data Store in VCenter
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Monitoring of Data Store in VCenter
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 ?
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 ?
Re: Monitoring of Data Store in VCenter
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?
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
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Monitoring of Data Store in VCenter
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?
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?
Re: Monitoring of Data Store in VCenter
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
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
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Monitoring of Data Store in VCenter
@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.
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.
Re: Monitoring of Data Store in VCenter
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?
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
Also, what is the command you are using when you received this 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
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Monitoring of Data Store in VCenter
@ kyang: version is as follows:
0.5.0
0.5.0
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring of Data Store in VCenter
^^kyang wrote:Also, what is the command you are using when you received this 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
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Monitoring of Data Store in VCenter
please find attached the screenshot attached for the command that i am using.
Re: Monitoring of Data Store in VCenter
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:
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.
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);
}
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/