Notification Time Periods

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Notification Time Periods

Post by jkinning »

Any thoughts on how I can get Nagios to send notifications to SMS devices that users setup for off hour timeperiods? Right now it looks like both the email and SMS function are tied to the same timeperiod. A few Business Units would like to get the emails during business hours and then after hours receive SMS alerts. It makes sense seeing most of us when we leave aren't checking corporate email on a regular basis. I am trying to prevent creating additional contacts (clones) for just SMS thinking there is a better way. I believe that is how it was done when we ran core. But now we have this fancy WebUI and a bunch of other awesome and cool features that I have a feeling I am overlooking how I can change SMS time periods for users.

Or even if there is a way to have hosts or service checks send notifications to email from time A to time B and then use SMS from time C to Time D or something like that. Just looks like today it is all or nothing.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Notification Time Periods

Post by mcapra »

The Timeperiods are really only relevant in terms of when the "notification handler" gets executed. You could probably accomplish this by writing a separate notification handler for these users/contacts, but it'd have to involve some pretty neat logic to be able to distinguish an "email" time period from a "sms" time period.

You could also write a script to enable/disable email/sms notifications for specific users within the nagiosxi.xi_usermeta by modifying the notify_by_email and notify_by_mobiletext keys as needed. Run it on a cron job or somesuch.
Former Nagios employee
https://www.mcapra.com/
Locked