1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Escalation Condition</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<meta name="keywords" content="Supervision, Icinga, Nagios, Linux">
<link rel="home" href="index.html" title="Icinga Version 1.0.2 Documentation">
<link rel="up" href="ch06.html" title="Chapter 6. Advanced Topics">
<link rel="prev" href="escalations.html" title="Notification Escalations">
<link rel="next" href="oncallrotation.html" title="On-Call Rotations">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Escalation Condition</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="escalations.html">Prev</a> </td>
<th width="60%" align="center">Chapter 6. Advanced Topics</th>
<td width="20%" align="right"> <a accesskey="n" href="oncallrotation.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="Escalation Condition">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="escalation_condition"></a><a name="escalation_cond"></a>Escalation Condition</h2></div></div></div>
<p><span class="bold"><strong>Introduction</strong></span></p>
<p>Starting with Icinga 1.0.1 a patch is implemented which introduces the ability to define an escalation_condition (similar to escalation_options [w,u,c,r]). An
escalation with a defined condition will only be escalated if the current state of a particular host/service fits the condition.
One possible example of use for this could be the following scenario:</p>
<p>Imagine two different escalations for the same service <span class="emphasis"><em>foo</em></span>. One of them should only escalate when
service <span class="emphasis"><em>bar</em></span> is OK, the other should escalate if <span class="emphasis"><em>bar</em></span> is CRITICAL or WARNING. Now think
about <span class="emphasis"><em>foo</em></span> being the main service offered by a company and the admin has to react immediately if it is down.
<span class="emphasis"><em>bar</em></span> could be a service indicating if the admin is in the office or at home and the escalation would react
as following:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>If the admin is in the office, send an email first, after 5 minutes send an SMS</p>
</li>
<li class="listitem">
<p>If the admin is at home, send an SMS first and after 30 minutes a second SMS to the admin and the head of
department</p>
</li>
</ul></div>
<p><span class="bold"><strong><span class="emphasis"><em>This should be achieved without reloading or restarting the Icinga service.</em></span></strong></span></p>
<p><span class="bold"><strong>Syntax</strong></span></p>
<p>The escalation_condition option is completely optional and can be defined for host escalations as well as for service
escalations. The syntax is:</p>
<p><code class="literal">escalation_condition <condition> ( [ & / | ] <condition> )*</code></p>
<p>where <condition> is either: <code class="literal">host hostname = [u,d,o]</code> or <code class="literal">service
hostname.service_description = [w,u,c,o]</code>.</p>
<p>As you can see, the escalation_condition accepts a list of one or more conditions separated by "&" (logical AND) or "|"
(logical OR). The meanings of [w,u,c,o,d] differ a bit from the ones used for escalation_options:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>w = WARNING</p>
</li>
<li class="listitem">
<p>u = UNKNOWN</p>
</li>
<li class="listitem">
<p>c = CRITICAL</p>
</li>
<li class="listitem">
<p>o = OK for services or UP for hosts (one could think of ONLINE)</p>
</li>
<li class="listitem">
<p>d = Down for hosts</p>
</li>
</ul></div>
<p><span class="bold"><strong>Example</strong></span></p>
<pre class="screen">define serviceescalation {
host_name localhost
service_description HTTP
first_notification 5
contact_groups admins, managers
escalation_condition host linux=d | service linux.SSH=w,c
}</pre>
<p> This example escalation would be escalated if the HOST 'linux' is DOWN or the Service 'linux.SSH' is WARNING or
CRITICAL.</p>
<p>[ Thanks to: Vitali Voroth, DECOIT GmbH * http://www.decoit.de ]</p>
<a class="indexterm" name="id1995447"></a>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="escalations.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch06.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="oncallrotation.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Notification Escalations </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> On-Call Rotations</td>
</tr>
</table>
</div>
<P class="copyright">© 2009-2010 Icinga Development Team, http://www.icinga.org</P>
</body>
</html>
|