<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Escalations are a little pesky to get working correctly.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Here is an example.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>define serviceescalation{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        host_name               .*<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        service_description     .*<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        first_notification      1<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        last_notification       0<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        notification_interval   60<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        contact_groups          admins<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_period       24x7<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_options      w,u,c,r<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        }<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>define serviceescalation{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        host_name               .*<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        servicegroup_name       disks,dns,firewall,load,mailq,processes,sendmail,ssh,time<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        first_notification      2<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        last_notification       2<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        notification_interval   60<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        contact_groups          support<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_period       24x7<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_options      w,u,c,r<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        }<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>define hostescalation{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        host_name               .*<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        first_notification      1<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        last_notification       0<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        notification_interval   60<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        contact_groups          admins<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_period       24x7<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_options      d,u,r<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        }<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>define hostescalation{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        host_name               .*<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        first_notification      2<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        last_notification       2<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        notification_interval   60<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        contact_groups          support<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_period       24x7<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        escalation_options      d,u,r<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        }<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>At least that’s what I think happens, I’m never sure with esculations!<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>For this to work I had to enable regular expressions and set up service groups.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I have a feeling I also removed the following from my hosts definitions as well.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>contact_groups admins<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>notification_interval 30<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>notification_period 24x7<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>notification_options d,r<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Hope that helps and gives you some ideas…<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Duncan<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Frost, Mark {PBC} [mailto:mark.frost1@pepsico.com] <br><b>Sent:</b> 10 November 2010 17:26<br><b>To:</b> 'Nagios Users List'<br><b>Subject:</b> [Nagios-users] different notification_intervals by contact<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>- 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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>- 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).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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".<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Mark<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br>-- <br>This message has been scanned for viruses and <br>dangerous content by <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is <br>believed to be clean. <o:p></o:p></span></p></div></body></html>