Page 2 of 3
Re: VMware config wizard issue
Posted: Thu Jul 27, 2017 1:55 pm
by lmiltchev
Is the check below still failing (with 6.5 SDK installed)?
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl -H X.X.X.X -N "<server_name>" -u <username> -p <password> -l IO -v
or
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl -H X.X.X.X -N "<server_name>" -u <username> -p <password> -l IO -vvv
Hopefully, the second one would give us more verbose output.
If the check is failing, you could start upgrading these perl modules via CPAN.
Next, try running you check again.
Re: VMware config wizard issue
Posted: Thu Jul 27, 2017 2:02 pm
by atremblay
Found that at around line 920, near the end of the generic_performance_values function, if I try to print $perf_data after it's populated it contains an "ARRAY(XXXXXXXX)" when done agains't any type of query (-l) except DISK (IO). When done against MEM, it returns the ARRAY(XXXXXX), but when done against IO, it contains nothing.
I checked the $perfMgr above it, and it seems to be fine. It's the QueryPerf() function that actually seems to return nothing ONLY for IO. Does this actually work for others?
Sorry for the ARRAY(XXXXXX), I don't know how to print array to text in Perl.
The above is from testing the command: /usr/local/nagios/libexec/check_esx3.pl -H X.X.X.X -N "<server_name>" -u <username> -p <password> -l IO -vvv
Has same result, only now I've tracked down more of the variable responsible for returning no data...
Re: VMware config wizard issue
Posted: Thu Jul 27, 2017 2:14 pm
by atremblay
I kind of screwed up one of the servers by trying to use CPAN to update Perl. I only got about half way through and then started getting notices from Nagios saying everything VMware was going down... but so I stopped... Well paused. I still have the SSH session open, but stopped answering yes to updating all the modules. Do you think it's possible that I just haven't updated all modules so it has dependencies that have not yet been installed and I should finish the CPAN install. If not, do you know a way to undo the CPAN update, or at least where I can download and reinstall the base perl package needed for Nagios to run?
Re: VMware config wizard issue
Posted: Thu Jul 27, 2017 2:23 pm
by atremblay
Quick question about CPAN updating. Is there a command I should run to update only certain modules. Or should I just run:
cpan
update
And then say 'yes' to each module...
Re: VMware config wizard issue
Posted: Thu Jul 27, 2017 2:58 pm
by lmiltchev
You don't need to update all of the modules. You can run:
Code: Select all
curl -L http://cpanmin.us | perl - App::cpanminus
then update the few modules that you need to update by running:
Example:
Code: Select all
cpanm Compress::Raw::Zlib
--> Working on Compress::Raw::Zlib
Fetching http://www.cpan.org/authors/id/P/PM/PMQS/Compress-Raw-Zlib-2.074.tar.gz ... OK
Configuring Compress-Raw-Zlib-2.074 ... OK
Building and testing Compress-Raw-Zlib-2.074 ... OK
Successfully installed Compress-Raw-Zlib-2.074 (upgraded from 2.021)
1 distribution installed
If for some reason you can't upgrade the module, you can try "forcing" it by running:
Be careful with the last command though. Don't use it unless you know what you are doing.
You can verify the version of a perl module by running something like this:
Code: Select all
perl -MCompress::Raw::Zlib -le 'print $Compress::Raw::Zlib::VERSION'
2.074
Hope this helps.
Re: VMware config wizard issue
Posted: Fri Jul 28, 2017 10:39 am
by atremblay
These command have been quite helpful. But it's quite tedious going module by module.
I've been going through module by module installing them on another server to see which one broke the VMware Plugin, but after more than 50+ I'm getting quite discouraged that I'm not going to find the one. There's no like "Base Perl" that Nagios recommends that I could just re-install and get back on the track to fixing the IO disk issue instead of the whole VMware Plugin?
Re: VMware config wizard issue
Posted: Fri Jul 28, 2017 2:35 pm
by tgriep
There isn't a list of good perl modules that are known to work with this plugin, the author of the plugin may have that,
Most if the issues I have had is with the VMWare SDK, when you install it, do not use the provided modules that came with the package, download and install the new ones.
Try re-installing the SDK but download the modules to see if that fixes the issue.
Re: VMware config wizard issue
Posted: Mon Jul 31, 2017 8:40 am
by atremblay
What I do to install the SDK is go out to VMware directly
https://code.vmware.com/web/sdk/65/vsphere-perl and download the tar. Then SCP it onto the Nagios server, extract, and run the ./vmware-install.pl file. At the end of it the install will tell you "The following Perl modules were found on the system but may be too old to work with vSphere CLI:". And then which ever modules are listed, I go out and update them. But after this, the disk IO still doesn't work.
Re: VMware config wizard issue
Posted: Mon Jul 31, 2017 10:43 am
by tgriep
What OS and release is the Nagios XI server running?
Lets run a strace on your command and see if we can get some details on why this check is failing for you.
Run the following as root and post the /tmp/strace.txt file.
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl -H X.X.X.X -N "<server_name>" -u <username> -p <password> -l IO &>/tmp/strace.txt
Then run these commands and post the /tmp/installed.txt file so I can get a list of installed perl modules on your system.
Code: Select all
cpan -l >/tmp/installed.txt
yum list installed |grep -i perl >>/tmp/installed.txt
Re: VMware config wizard issue
Posted: Mon Jul 31, 2017 11:36 am
by atremblay
So interestingly enough, trying to run the check_esx3.pl against the server that's messed up didn't seem to do anything (like not even complete, I had to kill the task after a couple minutes). In checking the syslog, I'm getting notices that this script keeps timing out each time it runs:
Code: Select all
nagios: Warning: Check of service 'Networking for VMHost' on host '<vcentre servername>' timed out after 60.007s!
And it repeats this for ALL services configured to use the check_esx3.pl script.
Running it on the server which is still alright give me the same old output, but just re-directed into a file.
Code: Select all
CHECK_ESX3.PL CRITICAL - HOST-VM IO Unknown error
As for the perl modules, they're attached.