Page 2 of 3
Re: More box293_check_vmware fun
Posted: Thu Jan 22, 2015 5:40 pm
by highness
We are
ALMOST there...
Box293 wrote:
ssh to the vMA as vi-admin
Type these four commands:
Code: Select all
time ~/box293_check_vmware.pl --server 10.YYY.YYY.YYY --timeout 600 --check List_Datastores
real 1m49.997s
user 0m47.391s
sys 0m1.324s
Code: Select all
time ~/box293_check_vmware.pl --server 10.YYY.YYY.YYY --timeout 600 --check List_Guests
real 0m19.756s
user 0m6.844s
sys 0m0.108s
Code: Select all
time ~/box293_check_vmware.pl --server 10.YYY.YYY.YYY --timeout 600 --check List_Hosts
real 0m9.597s
user 0m5.572s
sys 0m0.088s
Code: Select all
time ~/box293_check_vmware.pl --server 10.YYY.YYY.YYY --timeout 600 --check List_vCenter_Objects
real 0m13.482s
user 0m5.524s
sys 0m0.100s
Box293 wrote:
Establish an ssh session to your Nagios XI Host
Type this command:
Code: Select all
sed -i 's/-t 90/-t 300/g' /usr/local/nagiosxi/html/includes/configwizards/vmwarevirtualizationwizard/vmwarevirtualizationwizard_misc.php
I did that, and I also made this change:
Code: Select all
sed -i 's/-timeout 90/-timeout 300/g' /usr/local/nagiosxi/html/includes/configwizards/vmwarevirtualizationwizard/vmwarevirtualizationwizard_misc.php
Did that, re-ran the config wizard and they
all worked except the List_Guests - It returns nothing.
Re: More box293_check_vmware fun
Posted: Thu Jan 22, 2015 5:54 pm
by Box293
Something about the time it takes to run List_Guests doesn't seem right (it should be taking longer in your environment). Can you please do the following:
ssh to the vMA as vi-admin
Run this command:
Code: Select all
~/box293_check_vmware.pl --server 10.YYY.YYY.YYY --timeout 600 --check List_Guests --debug > ~/List_Guests_Output.txt 2>&1
And PM me the file
/home/vi-admin/List_Guests_Output.txt
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 10:31 am
by highness
File sent via PM.
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 1:54 pm
by lgroschen
highness,
When you get a chance to go through Box's suggestions, get back to us and let us know if this solved your issue.
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 2:11 pm
by highness
lgroschen wrote:
When you get a chance to go through Box's suggestions, get back to us and let us know if this solved your issue.
Once I hear back from Troy again, I'll certainly do that!
I just sent him the file he asked for this morning.

Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 2:14 pm
by tmcdonald
Troy actually is based out of Australia, so he might not have a chance to look at it any time soon. Do you want to PM the same thing to myself? I will make sure it gets saved on the network so other techs can look it over. Troy is the authority on it, but we might be able to catch something.
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 2:28 pm
by highness
tmcdonald wrote:...Do you want to PM the same thing to myself? I will make sure it gets saved on the network so other techs can look it over. Troy is the authority on it, but we might be able to catch something.
Just did.
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 2:36 pm
by tmcdonald
I got it (decoded and prettified the output, saved on network drive) and I can't really see any problems with it. Granted I didn't write the plugin, but nothing about the JSON or the debug info seems to indicate anything amiss.
I'm going to defer to Troy on this one, but I will let you know if I think of anything.
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 6:24 pm
by Box293
OK so the output from the plugin looks good, I was able to use in on test box here and I can see all the guests being displayed in the wizard.
Also, it just dawned on me that there are two separate timeout settings in my commands in the wizard.
Run this command on your Nagios XI box (in an SSH session):
Code: Select all
sed -i 's/--timeout 90/--timeout 300/g' /usr/local/nagiosxi/html/includes/configwizards/vmwarevirtualizationwizard/vmwarevirtualizationwizard_misc.php
So now I'll get you to run this command on your Nagios XI server :
This will show any errors that happen.
Now go into the wizard and click the
Retrieve Guests button.
Does the wizard work, do any errors appear in the SSH session if the wizard does not display any results?
Re: More box293_check_vmware fun
Posted: Fri Jan 23, 2015 7:17 pm
by highness
Box293 wrote:Also, it just dawned on me that there are two separate timeout settings in my commands in the wizard.
Run this command on your Nagios XI box (in an SSH session):
Code: Select all
sed -i 's/--timeout 90/--timeout 300/g' /usr/local/nagiosxi/html/includes/configwizards/vmwarevirtualizationwizard/vmwarevirtualizationwizard_misc.php
Yeah, I caught that when I made the changes a couple of messages ago

so that part is already done.
Box293 wrote:Now go into the wizard and click the Retrieve Guests button.
Does the wizard work, do any errors appear in the SSH session if the wizard does not display any results?
The /var/www/httpd/error_log does return this:
Code: Select all
[Fri Jan 23 15:40:54 2015] [error] [client 10.111.222.333] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 111258995 bytes) in /usr/local/nagiosxi/html/includes/configwizards/vmwarevirtualizationwizard/vmwarevirtualizationwizard_misc.php on line 610, referer: http://nagios.vsp.com/nagiosxi/config/monitoringwizard.php?update=1&nextstep=2&nsp=05e9e51c3cb07c72a2e68eda439c5c8f&wizard=vmwarevirtualizationwizard
I checked the /etc/php.ini file and the memory_limit was set to 128M
I set the memory_limit to 256M and restarted Apache and re-ran the wizard again and saw this error:
Code: Select all
[Fri Jan 23 15:53:43 2015] [error] [client 10.111.222.333] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 178747393 bytes) in /usr/local/nagiosxi/html/includes/configwizards/vmwarevirtualizationwizard/vmwarevirtualizationwizard_misc.php on line 1047, referer: http://nagios.vsp.com/nagiosxi/config/monitoringwizard.php?update=1&nextstep=2&nsp=05e9e51c3cb07c72a2e68eda439c5c8f&wizard=vmwarevirtualizationwizard
I changed memory_limit to 512M, restarted Apache, re-ran the wizard, saw no errors in the /var/httpd/error_log, but I did get this popup from Firefox:
Code: Select all
A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
Script: http://nagios.vsp.com/nagiosxi/includes/js/jquery/jquery-1.8.2.min.js?2014R2.3:2
I told Firefox to let the script continue, and it did finish a couple of minutes later.
So, it looks like it works, but I'm concerned about the javascript error and wondering if we need to change that too?