Page 1 of 1

Variations of email notifications

Posted: Thu May 27, 2021 10:58 am
by jsalsbury
Good morning,
We have recently kicked off a new on-call that can receive notifications based on the alerts that Nagios sends. I have run into a small snag. Is there a way to not send a notification based on a non-alert response. For instance the beginning and end of downtime? Can I stop those entirely?

Re: Variations of email notifications

Posted: Thu May 27, 2021 5:47 pm
by ssax
You can edit the contact, click the Alert Settings tab, and check everything except the Scheduled Downtime option under the notification options items and that should stop them from receiving those downtime start/end notifications. Will that meet your needs?

Re: Variations of email notifications

Posted: Thu May 27, 2021 8:41 pm
by jsalsbury
Thanks so much for the help, I will try this tomorrow morning, is there a way to kick off alerts to test emails?

Re: Variations of email notifications

Posted: Fri May 28, 2021 2:20 pm
by ssax
You'll need to submit the downtime to validate whether or not they receive those specific ones.

How to submit passive results for testing notifications:

For Hosts
------------

Go to Home > Host Status:
- Find the Host and click on it
- Click the + tab
- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button

NOTE: By default, passive_host_checks_are_soft=0 is set in your /usr/local/nagios/etc/nagios.cfg, this differs from services in that when you submit a passive host check result it immediately goes into a HARD state (and should send a notification if configured to) instead of going into a SOFT state like services do. (notifications are only sent on HARD states).

For Services
----------------

Go to Home > Service Status:
- Find the Service and click on it
- Click the + tab
- Note these two rows:

State Type: Hard
Current Check: 1 of 4

Those columns tell the current State Type and the Current Check number. In order to generate a notification for a service you will need to submit MULTIPLE problem check results (the number that you need to submit is determined by the last number in the Current Check column, that is the max_check_attempts setting). For services, when you submit a passive check result, each result that you submit will be a SOFT state until you submit enough to hit the Max Check Attempts setting that you've defined on the service, only then will the service enter a HARD problem state which will generate the notification (just remember, notifications are only sent on HARD states).

- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button
- Submit as many as you need, right after another, until the service enters the HARD state so that a notification will be sent

NOTE: When coming from a HARD problem state (whether we are talking about hosts or services) if you submit an OK passive result it should fire off a recovery notification after a single passive result has been submitted.