Page 1 of 1

check_esx3.pl is working for all services except datastore

Posted: Wed Jul 19, 2017 10:34 am
by srikgali
We are using check_esx3.pl plugin for ESX host monitoring. Which is working fine for all other services like cpu , memory etc but i am having issue with datastore usage service. error follows
[nagios@Nagios hostname ~]$ /usr/local/nagios/libexec/check_esx3.pl -H "esx hostname.com" -f "/usr/local/nagiosxi/etc/components/vmware/user_ESX_HOST.txt" -l "vmfs"
CHECK_ESX3.PL CRITICAL - Undefined subroutine &Nagios::Plugin::Functions::max_state called at /usr/local/nagios/libexec/check_esx3.pl line 812

plugin version: check_esx3.pl 0.5.0

I have already installed VMware SDK

Any idea?

Re: check_esx3.pl is working for all services except datasto

Posted: Wed Jul 19, 2017 3:10 pm
by tgriep
If could be the permissions of the user account on the VMWare servers need to be changed.
For some reason assigning the permissions at the top level of “Inventory > Hosts and Clusters” is not enough sometimes.
You need to also assign the permissions at the top level of “Inventory > Datastores and Datastore Clusters” so that user account can poll the Datastores.

Re: check_esx3.pl is working for all services except datasto

Posted: Thu Jul 20, 2017 4:06 pm
by srikgali
When we checked the permissions, I can see all datastores from the user. so it should not be permission issue.
do you find anything with the error message from nagios.

Error:
CHECK_ESX3.PL CRITICAL - Undefined subroutine &Nagios::Plugin::Functions::max_state called at /usr/local/nagios/libexec/check_esx3.pl line 812

Re: check_esx3.pl is working for all services except datasto

Posted: Fri Jul 21, 2017 9:47 am
by tgriep
It could be a bug in that version of the plugin, try upgrading it and see if the error is resolved.
I do have this version running on my system using the same option and it works like it should.

To upgrade the plugin to version 0.7.1, follow these steps.

First, login to the XI server as root and make a backup of the existing one by running the following.

Code: Select all

cp /usr/local/nagios/libexec/check_esx3.pl /usr/local/nagios/libexec/check_esx3.pl.old
Then run the following to install a required Perl Module for the new plugin.

Code: Select all

yum install perl-Nagios-Plugin
Then download this updated plugin to your PC.
https://github.com/shinken-monitoring/p ... ck_esx3.pl

After it is downloaded, login to the XI GUI and go to the Admin > Manage Plugins menu
Browse to the new plugin and then click on the Upload Button.

Try that and let us know if this fixes the error.

Re: check_esx3.pl is working for all services except datasto

Posted: Fri Jul 21, 2017 2:15 pm
by srikgali
It is resolved after upgrading the plugin, thanks for your help

Re: check_esx3.pl is working for all services except datasto

Posted: Fri Jul 21, 2017 2:17 pm
by tgriep
Your welcome. I'll mark the post as solved and lock it. If you have any questions in the future, feel free to open a new post.