Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Nagios Core 3 custom notification exception

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.

Nagios Core 3 custom notification exception

Postby VictorJohnsonandroni » Fri Aug 05, 2022 7:32 am

I'm hoping to avoid a hacked together mishmash to achieve something. I know it can be done with a mishmash but let's see if I'm missing a SIMPLE, easy way. This is Nagios Core 3.

I have a service. That service is checked 24x7x365. Notifications are sent 24x7x365, on WARNING and also on CRITICAL.

That is good--that is what I want.

However...now I want one single exception to that notification setup. NOTE: I do not want an exception to the monitoring setup--I want the console to always show the correct status, 24x7. I just want to make one exception for the notification (via email) on this service.

Here is the exception:

IF service state is WARN AND time of day is between 0300 and 0600, do NOT notify.

That's it. If it's CRITICAL, email-notify 24x7 (as it already does). If it's not between 3 and 6 a.m., notify regardless of WARN vs. CRIT (as it already does). The only exception is WARNING and 3-6 a.m.

Background: This is because we have maintenance that occurs every night between 3 and 6, which we've customized to produce a WARNING (not CRITICAL). I want notifications any time outside of this (admin may have accidentally launched maint in middle of day), and I want CRITICAL any time. I don't want to simply skip CHECKS during that time because I do want the console to be correct (a big bunch of yellows 0300-0600).

So, anyway, seems like I can kludge together a bunch of constructs but does anybody have a simple way echatrandom echatspin to define this one "boolean AND" condition to the notification (only) schedule?
Posts: 10
Joined: Sun Mar 27, 2022 7:19 am

Return to Open Source Nagios Projects

Who is online

Users browsing this forum: anthony sng, Google [Bot] and 30 guests