How to configure notifications using NoMa



Essentially, notification rules define the who, what, where, when, why, and how of alert notifications. Rules contain various directives including contacts and contact groups defining who is to receive notifications, what monitored hosts and services should be included or excluded in the notifying, where and when notifications should be sent, and which event states to notify upon. Notification rules can be enabled (active) and disabled, and rules can be set to escalate notifications after a specified number of notifications is reached. This page steps through how to configure a notification rule, and how to set up the contact association necessary for every host or service you desire to be controlled via NoMa.

The expandable image below illustrates a notification rule and points out the tabs where the components are defined and where they are incorporated into a rule.

Figure: Notification rule

Creating a notification rule

Before continuing below, you should configure contacts and contact groups as reviewed in Notifications and Downtime How To's. Then, follow the steps below to create a notification rule.

  1. Go to Configuration > NoMa.
  2. Select the Notifications tab.
  3. Click the Create button on the right side of the screen, (select the pencil icon to edit an existing rule).
  4. Enter the notification directives, we start with section for Notification Information;
  5. Next, in the Hosts and Services section, you will need to indicate which hosts, host groups, services, service groups and recipients are to be included or excluded in the notification rule.
  6. In the Contacts and methods to notify section you will need to select who will receive and how the notification will be received.
  7. Next, select a Timezone to be used for the notification, and a Timeframe indicating the hours allowed for notifications to be sent.
  8. Under the Which events to notify section, check (or uncheck) the filter options for the recovery, problem, state transitions, and other states of change for which to send notifications.
  9. In the Numbers and more section, set the notify after number to indicate when notifications should start being sent, (e.g., 1 sends a first notification, 2-6 sends sends second through sixth notifications).
  10. Select Create/Save.
  11. And lastly, if you wish to continue notifications after the specified notify after directive you can add escalations. The escalations option is only displayed for previously defined notification rules.
Setting host and service notification commands

A script is provided for inclusion with Nagios as the notification command (host-notify-by-noma, service-notify-by-noma) that will be triggered for every host or service you desire to be controlled via NoMa.

If you are using a version of GroundWork Monitor prior to 7.2.0 please see About Notifications and Downtime for reference regarding updated host and service NoMa commands.

You will need to associate the NoMa commands with a contact, that contact with a contact group, and that contact group with every object that will be using NoMa to alert, along with the appropriate notify conditions and time periods. On the occasion of a state change, this notification transmits the specifics to the NoMa daemon by calling the script; the daemon uses the specifics passed in the script compared to the stored filters in the NoMa database and on a match sends out a NoMa message to the contacts named in that matching filter. NoMa sends the message using a different script, one of several available for choice in the filter setup.

In Nagios/Monarch you will need to add/edit the contact to be associated with the forwarding of the alerting. In the example below we use the nagiosadmin contact which has the assigned nagiosadmin contact group, and notify-by-noma commands. This will associate the alert via NoMa script as a notification command for hosts and for services with nagiosadmin contact. You will also need to make sure that all hosts for NoMa alserts are setup with this contact group, (e.g., nagiosadmin). You may want to create a new contact and contact group.

  1. Go to Configuration > Contacts > Contacts > Modify, and select the contact to modify, (e.g., nagiosadmin).
  2. Set the Host notification commands directive to host-notify-by-noma and the Service notification commands directive to service-notify-by-noma, (see image below).
  3. Scroll down and set the contact group, (e.g., nagiosadmin), you may need to uncheck the inherit box to do so.
  4. Click Save.

    Figure: Set notify-by-noma commands
Enabling and receiving notifications

Once notifications are enabled they can be received based on the methods defined and can be viewed in the NoMa application Logs tab.

  1. In Nagios, the Enable notification directive on the Nagios main configuration page controls the enabling and disabling of system wide notifications. Go to Configuration > Control, expand Nagios main configuration, select Notification.
  2. To enable check the box for Enable notifications, then click Save and Next >> 3 times, and Save and Done.
  3. From the left side navigation select Commit and follow the process to commit the configuration change.

    Figure: Enable notifications
  4. In NoMa, notification definitions can be turned on and off. To activate a notification definition, go to Configuration > NoMa > Notifications.
  5. Toggle the check mark icon to be green (activate) for the corresponding notification rule.

    Figure: Activate a notification rule

  6. Notifications will then be sent based on the directives set in the notification rule. The notification example email below shows the host d-exchange-2010.sales-demo.local in a CRITICAL state. The Link: is active and (if logged in) will go directly into the Status application for this device where you can acknowledge and or apply actions. 

    Figure: Example NoMa email notification
    ***** NoMa *****
    ID: 1
    Notification Type: PROBLEM
    Host: d-exchange-2010.sales-demo.local
    Host Alias: sales-demo
    State: DOWN
    Address: ###.##.###.##
    Info: CRITICAL - ###.##.###.##: Host unreachable @ ###.##.###.##. rta nan, lost 100%
    Date/Time: Tue Dec 12 11:44:56 2017
  7. The Logs tab displays NoMa notifications in a list which is accessible during runtime and displays alerts with status information in the order they are generated.
Log Files