check_esx3.pl is working for all services except datastore

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
srikgali
Posts: 46
Joined: Thu Apr 07, 2016 9:18 am

check_esx3.pl is working for all services except datastore

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
srikgali
Posts: 46
Joined: Thu Apr 07, 2016 9:18 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
srikgali
Posts: 46
Joined: Thu Apr 07, 2016 9:18 am

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

Post by srikgali »

It is resolved after upgrading the plugin, thanks for your help
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked