different escalation intervals possible?
Michael Barrett
loki77 at gmail.com
Mon Jul 18 18:14:18 CEST 2011
Thanks Assaf. It's a little complicated, but here's my config for a 'critical service':
### First my escalation definitions:
define serviceescalation {
name page-primary
first_notification 1
last_notification 0
notification_interval 15
contact_groups primarypager
servicegroup_name critical-services
}
define serviceescalation {
name page-secondary
first_notification 3
last_notification 0
notification_interval 15
contact_groups secondarypager
servicegroup_name critical-services
}
define serviceescalation {
name email-ops
first_notification 1
last_notification 0
notification_interval 120
contact_groups ops-group
servicegroup_name critical-services
}
#### Now my contact groups
define contactgroup {
contactgroup_name ops-group
alias Operations People
}
define contactgroup {
contactgroup_name primarypager
alias Primary Pager
}
define contactgroup {
contactgroup_name secondarypager
alias Secondary Pager
}
#### Now a pair of example contacts (and templates) that tie into those groups
define contact {
name generic-contact
host_notification_period 24x7
service_notification_period 24x7
host_notifications_enabled 0
host_notification_options d,u,r
service_notification_options u,c,w,r
host_notification_commands host-notify-by-email
service_notification_commands service-notify-by-email
register 0
can_submit_commands 1
}
# pager template
define contact {
name pager-template
use generic-contact
host_notification_options d,u
service_notification_options u,c
host_notification_commands host-notify-by-epager
service_notification_commands service-notify-by-epager
register 0
}
define contact {
name ops-contact
contactgroups ops-group
use generic-contact
register 0
}
define contact {
contact_name mb
alias Michael Barrett
use ops-contact
email loki77 at gmail.com
}
define contact {
contact_name mb-phone
alias Mike Phone
contactgroups primarypager
use pager-template
email ########@mms.att.net
}
#### Now the servicegroup for critical-services
define servicegroup {
servicegroup_name critical-services
alias Services that should page
}
#### And finally a service that is in critical services (and its template)
define service {
name generic-service
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 0
obsess_over_service 1
check_freshness 0
notifications_enabled 1
notification_interval 120
notification_period 24x7
notification_options u,c,w,r
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contact_groups ops-group
register 0
}
define service {
use generic-service
service_description puppet last run
check_command check_puppet
hostgroup_name all_hosts,!virtual-hosts
servicegroups critical-services
}
######################################
Let me know if you have any questions, and thanks again!
On Jul 18, 2011, at 2:56 AM, Assaf Flatto wrote:
> Michael Barrett wrote:
>> Hi - I am trying to get alerts for my services to work like this:
>>
>> - all alerts (warning, critical, unknown, and recovery) go to the 'email-ops' contact every 2 hours
>> - on some services (the ones deemed critical) in addition I want them to send an email to the 'primary-pager' contact every 15 minutes
>>
>> I thought I had the configuration setup appropriately for this, but now I'm not sure it's possible without a better understanding of how escalations work (and it may not even be possible then) since I read this about overlapping escalations:
>>
>> "Since it is possible to have overlapping escalation definitions for a particular hostgroup or service, and the fact that a host can be a member of multiple hostgroups, Nagios has to make a decision on what to do as far as the notification interval is concerned when escalation definitions overlap. In any case where there are multiple valid escalation definitions for a particular notification, Nagios will choose the smallest notification interval."
>>
>> Anyway, is there anyway to make that work? The way its working now is that it seems to email the email-ops list every 15 minutes on critical services, and for email we'd like to get less alerts.
>>
>> Thanks in advance!
>>
>> --
>> Michael Barrett
>> loki77 at gmail.com
>>
> The short answer is , Yes .
>
> if you share your configuration we might also be able to give tips and
> pointers on what needs to be modified.
>
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> 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
--
Michael Barrett
loki77 at gmail.com
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
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