Limit max notifications

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.
Post Reply
gmalsack
Posts: 3
Joined: Fri Dec 04, 2015 12:57 pm

Limit max notifications

Post by gmalsack »

Hello All,

I'm monitoring 345 hosts and 1146 services. When there's a major outage, or our nagios VM has an issue, it triggers hundreds of email notifications, which are going to text addresses, (phonenumber)@vtext.com for example. Obviously LOTS of them get blocked (deferred on the smtp relay). So eventually, the problem is fixed but unfortunately there are tons of deferred notifications that the smtp server keeps trying over time, sometimes I'm getting notifications days later because of this. Does anyone know if there's a way to send 1 notification that basically says "hey there's a problem, go check it out" no matter what or how many host(s) or service(s) triggers the alert, rather than sending a notification for each service/host that's having a problem?

Thanks
Greg
atc0005
Posts: 26
Joined: Thu Oct 28, 2021 2:03 pm

Re: Limit max notifications

Post by atc0005 »

Does anyone know if there's a way to send 1 notification that basically says "hey there's a problem, go check it out" no matter what or how many host(s) or service(s) triggers the alert
It sounds like you probably want to setup a dependency so that if the specified host & service is down you won't see notifications for the dependent hosts/services.

Here is an example of setting up services on a host named "SERVER1" that are dependent on "Windows Remote Procedure Call Service". If that service is unavailable, other service checks for the host will be skipped:

Code: Select all

define servicedependency {
    # The name of this host. This should match the host value for other
    # service checks defined for the host.
    host_name                       SERVER1

    # The name of the service check that dependent service checks depend on.
    # This service check must be defined for each host, either directly or
    # through hostgroup membership. This service check is treated as "core" or
    # required for a Windows server to be functional.
    service_description             Windows Remote Procedure Call Service

    # This value should be the same as host_name; we are setting a dependency
    # for all service checks for the host on a "core" or primary service check
    # on the same host.
    dependent_host_name             SERVER1

    # Match all services, but exclude the service that they're dependent on
    # to prevent any dependency loops.
    dependent_service_description   *,!Windows Remote Procedure Call Service

    # Skip all other service checks if the specified service check name
    # ("Windows Remote Procedure Call Service" in our case) is in one of these
    # states. We are assuming that if the specified service check is in any
    # non-OK state that the box is unstable and checking any further service
    # checks is not useful.
    execution_failure_criteria      w,c,u
}
You can also set a dependency so that if a network gateway is not reachable everything behind it won't trigger separate notifications. I've not configured that before, but I've read that it is possible.
Post Reply