check_esx behavior

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
intelXIadmin
Posts: 65
Joined: Mon Mar 25, 2013 9:10 am

check_esx behavior

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_esx behavior

Post by abrist »

Not really. The best way to handles these situations is to put the host into downtime.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_esx behavior

Post 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.
intelXIadmin
Posts: 65
Joined: Mon Mar 25, 2013 9:10 am

Re: check_esx behavior

Post by intelXIadmin »

Please see attached.

Regards,

Randy.
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_esx behavior

Post 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.
intelXIadmin
Posts: 65
Joined: Mon Mar 25, 2013 9:10 am

Re: check_esx behavior

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_esx behavior

Post 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)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_esx behavior

Post 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).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked