different notification_intervals by contact
Duncan Berriman
duncan at dcl.co.uk
Wed Nov 10 18:59:57 CET 2010
Escalations are a little pesky to get working correctly.
Here is an example.
define serviceescalation{
host_name .*
service_description .*
first_notification 1
last_notification 0
notification_interval 60
contact_groups admins
escalation_period 24x7
escalation_options w,u,c,r
}
define serviceescalation{
host_name .*
servicegroup_name
disks,dns,firewall,load,mailq,processes,sendmail,ssh,time
first_notification 2
last_notification 2
notification_interval 60
contact_groups support
escalation_period 24x7
escalation_options w,u,c,r
}
define hostescalation{
host_name .*
first_notification 1
last_notification 0
notification_interval 60
contact_groups admins
escalation_period 24x7
escalation_options d,u,r
}
define hostescalation{
host_name .*
first_notification 2
last_notification 2
notification_interval 60
contact_groups support
escalation_period 24x7
escalation_options d,u,r
}
This alerts admins after the interval set on the host/service (5 mins) and
then every hour. On the second alert (5+60 mins) it will alert support (for
the services listed) just the once but then continue to alert admins every
hour.
At least that's what I think happens, I'm never sure with esculations!
For this to work I had to enable regular expressions and set up service
groups.
I have a feeling I also removed the following from my hosts definitions as
well.
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options d,r
Hope that helps and gives you some ideas.
Duncan
From: Frost, Mark {PBC} [mailto:mark.frost1 at pepsico.com]
Sent: 10 November 2010 17:26
To: 'Nagios Users List'
Subject: [Nagios-users] different notification_intervals by contact
So we're setting up some Nagios checks for a new team and they're asking for
something new that I'm not really sure we can do with Nagios. For any
production alerts they want to receive pager alerts every 15 minutes and
e-mail alerts every 60 minutes. Since each host/service definition has only
a single notification_interval setting and contact definitions don't allow a
notification_interval setting, I don't see how this can be done within that
context.
We don't currently use escalations for anything, but I've been staring at
them and trying to figure out how that might work for us. In terms of using
escalations to solve this problem I'm struck by several issues:
- I'd be trying to use escalations to setup an indefinite pattern, not a
system where there's an last_notification where everyone gets the
notifications.
- I have to do this for a lot of hosts/services and it doesn't look like I
can wildcard service_descriptions (tried it and it failed).
My other thought is to just have 2 checks for the same service where check A
has the 15-minute notification_interval and goes to pagers and check B has a
1-hour notification_interval and goes to e-mail. And that's for a lot of
services. I can't really do the duplicate checks on hosts. But either way,
you know, "yuck".
I keep thinking there's some easier more obvious solution that's eluding me
to this. Is something that anyone else has solved? I'm inclined to tell
them that we can't do this and get them to unify on one
notification_interval like everyone else, but before I do, I thought I'd
ask.
Thanks
Mark
--
This message has been scanned for viruses and
dangerous content by <http://www.mailscanner.info/> MailScanner, and is
believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20101110/45a8c10a/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list