Page 1 of 1
check_esx behavior
Posted: Mon Apr 28, 2014 10:49 am
by intelXIadmin
Hello,
I am using check_esx to monitor CPU usage on a virtual guest. When the guest is powered off, the guest status is ok, which is fine, but the CPU status turns critical. Is there a way for the cpu status to stay OK since the guest is down?
Regards,
Randy.
Redhat 6.4
NagiosXI 2012R2.9
Re: check_esx behavior
Posted: Mon Apr 28, 2014 10:56 am
by abrist
Not really. The best way to handles these situations is to put the host into downtime.
Re: check_esx behavior
Posted: Mon Apr 28, 2014 10:57 am
by slansing
Can you navigate to the CCM, and find this service check? Then click the diskette icon next to it. This should pop out into a new tab and show you what the config file actually looks like, please copy this output and attach it in a .txt file here, or paste it into a reply here and make sure to wrap it with code wraps. Simply select the entire chunk of code and click the 'Code' button above. But downtime would be the easiest way to do this. If you are using the default values from the wizard abrist's suggestion would work great for you. In either case really.
Re: check_esx behavior
Posted: Mon Apr 28, 2014 11:54 am
by intelXIadmin
Please see attached.
Regards,
Randy.
Re: check_esx behavior
Posted: Mon Apr 28, 2014 4:53 pm
by slansing
Well, it would take quite a bit of work, you would need to write a wrapper script around check_esx3_host.pl to handle CPU checks coming in from down guests, parse the check result output, and redirect it with an exit code of '0' to keep it OK. Other than that, downtime would work good for suppressing alerts when you know the guest will be down, this could be handled easily with recurring downtime if these guests are known to be offline at around the same time of the week/month. You could mass acknowledge them as well as they go offline through Home > Mass Acknowledgement.
Re: check_esx behavior
Posted: Tue Apr 29, 2014 9:56 am
by intelXIadmin
Thank you. That is what I thought and it makes sense. If you monitor something, you do it because you expect it to be up.
Re: check_esx behavior
Posted: Tue Apr 29, 2014 10:06 am
by slansing
Well, to an extent. We understand that there are widely varying environments that require interesting methods for monitoring. The beauty is, if you do decide you want to monitor those objects, but you want a specific result to trigger a state change that it does not normally trigger, you can edit the plugin to do so, or create a wrapper script that will... quite simplistically work like so:
Code: Select all
if (guest is running and CPU is critical)
then (exit with 2 + critical status output)
elseif ( guest is stopped and CPU is critical)
then (exit with 0 + critical status output)
Re: check_esx behavior
Posted: Tue Apr 29, 2014 4:59 pm
by Box293
You could setup a 'ping' service check for the guest and then make the CPU status check depend on the ping service check. If the ping service check is critical then the CPU status check will not trigger alerts (I'm pretty sure the CPU status check will not execute if the dependant service is critical).