Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add notification_interval to contact(group)s OR keep sending normal notifications together with escalations #997

Open
vladki77 opened this issue Oct 18, 2024 · 3 comments

Comments

@vladki77
Copy link

Hello,

I think it would be useful to be able to specifiy notification_interval for contatcs separately. Some contacts may be ok for being alerted frequently if something is wrong, but some may need only 1 or much less frequent notifications.

I tried to achieve this with escalations, but the problem is that when escalation happens, the usual notification is suppressed, which was not convenient either. So an alternative would be an option for escalations to not suppress the normal notification.

Best regards
Vladislav Kurz

@everwatch
Copy link

That doesn't make sense given how Nagios works. The host/service creates an alert which triggers a notification. It is the notification that has a notification_interval, not the source (host/service) or the target (the contact). The contact does have a notification_period that can be used to determine when they get notified, but not a notification_interval because that would require a multi-threaded notification management system to keep track of individual notifications for individual contacts to make sure everyone gets notified at their custom interval.

That won't be easy to program, will create lots of extra work for the Nagios scheduler, and is not in line with the methodology of how Nagios works today. See https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/objectdefinitions.html#contact for more information on configuring the notification_period if this helps you.

As for original notifications being suppressed during escalations, the documentation for escalation (https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/escalations.html) clearly states:

it is important to keep in mind that any contact groups that were members of "lower" escalations (i.e. those with lower notification number ranges) should also be included in "higher" escalation definitions. This should be done to ensure that anyone who gets notified of a problem continues to get notified as the problem is escalated.

So you should be doing that as your general approach, as directed.

@vladki77
Copy link
Author

OK, I agree that matching notification_interval for every contact would be difficult.

Regarding escalations - the current logic prevents me to have one "higher" level escalation contact(group) if the "lower" level escalations differ for various services/hosts. I'd have to create multiple escalations that match the lower levels.

E.g.: I have 2 hostgroups, with normal notifications going to contactgroups A+B and A+C respectively. I want escalations to go to contactgroup D in addition to A+B/C. I do not want B or C getting nottifications (event escalated) for hosts that are not their business. Now I have to define two escalactions: A+B+D and A+C+D. If escalations would (optionally) not suppress lower level notifications, I'd need only one escalation for D.

Is at least that feasible?

@everwatch
Copy link

I agree that optionally having normal notifications continue while escalations are configured would be a good addition.

@vladki77 vladki77 changed the title Feature request: add notification_interval to contact(group)s Feature request: add notification_interval to contact(group)s OR keep sending normal notifications together with escalations Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants