19. 12. 2024 Balawal Sultan NetEye

Find Applied Notification Rules with the Notification Matcher Module

When you’re monitoring complex IT system infrastructure, and have over one hundred notification rules configured that make use of many custom variables, finding out exactly what notification rule is applied on a Host/Service can quickly become tricky. The Notification Matcher module allows you to find out exactly which notification rule is applied on a Host/Service.

How does it work?

  1. Go through the Director DB and find the notification apply rules for a Service/Host.
  2. Make an Icinga 2 API call using that Notification Apply Rule (NAR) filter
    • Many Hosts/Services can match an NAR filter, so how do we make sure that the NAR is applied to the Hosts/Service we are interested in?
      • For a Hosts API call add the condition:
        match(“host-name”,host.name)
      • For a Services API call add the condition:
        match(“service-host-name”,service.host_name) && match(“service-name”,service.name)
    • Each API call will match exactly one object, or none at all
  3. Show the results in the Icinga Web 2 interface

Some quality of life features

Quick links: In the Host/Service overview tab you can click on a Host/Service object, and then above the Problem Handling section you’ll find a link which will automatically look for the NARs that match the selected Host/Service:

Match Disabled rules: Verifies whether any disabled NARs would apply to a Host/Service:

Notification Rule name filter: If you want to verify that a specific NAR has been applied to a Host/Service, then you can use the filter function to look for the NAR you’re interested in.

Balawal Sultan

Balawal Sultan

Author

Balawal Sultan

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive