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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>7.10. Eskalations-Bedingung</title>
<link rel="stylesheet" href="../stylesheets/icinga-docs.css" type="text/css">
<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.14 Dokumentation">
<link rel="up" href="ch07.html" title="Kapitel 7. Fortgeschrittene Themen">
<link rel="prev" href="escalations.html" title="7.9. Benachrichtigungseskalationen">
<link rel="next" href="oncallrotation.html" title="7.11. Bereitschafts-Rotation">
<script src="../js/jquery-min.js" type="text/javascript"></script><script src="../js/icinga-docs.js" type="text/javascript"></script>
</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">7.10. Eskalations-Bedingung</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="escalations.html">Zurück</a> </td>
<th width="60%" align="center">Kapitel 7. Fortgeschrittene Themen</th>
<td width="20%" align="right"> <a accesskey="n" href="oncallrotation.html">Weiter</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="7.10. Eskalations-Bedingung">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="escalation_condition"></a>7.10. <a name="escalation_cond"></a>Eskalations-Bedingung</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">7.10.1. <a href="escalation_condition.html#introduction">Einleitung</a></span></dt>
<dt><span class="section">7.10.2. <a href="escalation_condition.html#syntax">Syntax</a></span></dt>
<dt><span class="section">7.10.3. <a href="escalation_condition.html#example">Beispiel</a></span></dt>
</dl></div>
<div class="section" title="7.10.1. Einleitung">
<div class="titlepage"><div><div><h3 class="title">
<a name="introduction"></a>7.10.1. Einleitung</h3></div></div></div>
<p>Sie können eine Eskalations-Bedingung definieren (ähnlich wie escalation_options [w,u,c,r]). Eine Eskalation mit einer definierten
Bedingung wird nur dann eskalieren, wenn der aktuelle Zustand eines bestimmten Hosts/Services mit der angegebenen Bedingung
übereinstimmt. Ein mögliches Anwendungsbeispiel könnte das folgende Szenario sein:</p>
<p>Stellen Sie sich zwei verschiedene Eskalationen für den selben Service <span class="emphasis"><em>foo</em></span> vor. Eine soll nur dann
eskalieren, wenn der Service <span class="emphasis"><em>bar</em></span> OK ist, die andere soll eskalieren, wenn <span class="emphasis"><em>bar</em></span> CRITICAL oder
WARNING ist. Nun stellen Sie sich vor, dass <span class="emphasis"><em>foo</em></span> der zentrale Service einer Firma ist und der Administrator sofort
reagieren muss, wenn der Service down ist. <span class="emphasis"><em>bar</em></span> könnte ein Service sein, der angibt, ob der Admin im Büro oder zu
Hause ist. Die Eskalation würde wie folgt reagieren:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>wenn der Administrator im Büro ist, dann sende zuerst eine e-Mail, nach 5 Minuten dann eine SMS</p>
</li>
<li class="listitem">
<p>wenn der Administrator zu Hause ist, dann sende zuerst eine SMS und nach 30 Minuten eine zweite SMS an den Administrator sowie
eine SMS an den Abteilungsleiter</p>
</li>
</ul></div>
<p>Dies kann erreicht werden, ohne Icinga neu zu starten bzw. die Konfiguration neu zu laden.</p>
</div>
<div class="section" title="7.10.2. Syntax">
<div class="titlepage"><div><div><h3 class="title">
<a name="syntax"></a>7.10.2. Syntax</h3></div></div></div>
<p>Die Direktive escalation_condition ist komplett optional und kann sowohl für Host- als auch für Service-Eskalationen definiert
werden. Die Syntax lautet:</p>
<p><code class="literal">escalation_condition <condition> ( [ & / | ] <condition> )</code></p>
<p>wobei <condition> entweder <code class="literal">host hostname = [u,d,o]</code> oder <code class="literal">service hostname.service_description =
[w,u,c,o]</code> ist.</p>
<p>Wie Sie sehen können, akzeptiert escalation_condition eine Liste von einer oder mehreren Bedingungen, die durch "&" (logisches
UND) oder "|" (logisches ODER) getrennt sind. Die Bedeutungen von [w,u,c,o,d] unterscheiden sich geringfügig von denen, die bei
escalation_options benutzt werden:</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 für Services oder UP für hosts (man könnte an ONLINE denken)</p>
</li>
<li class="listitem">
<p>d = Down für hosts</p>
</li>
</ul></div>
</div>
<div class="section" title="7.10.3. Beispiel">
<div class="titlepage"><div><div><h3 class="title">
<a name="example"></a>7.10.3. Beispiel</h3></div></div></div>
<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>Diese Beispiel-Eskalation würde eskalieren, wenn der HOST 'linux' DOWN ist oder der Service 'linux.SSH' WARNING oder
CRITICAL.</p>
<p>[ Thanks to: Vitali Voroth, DECOIT GmbH * http://www.decoit.de ]</p>
<a class="indexterm" name="idm139734665725776"></a>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="escalations.html">Zurück</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch07.html">Nach oben</a></td>
<td width="40%" align="right"> <a accesskey="n" href="oncallrotation.html">Weiter</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">7.9. Benachrichtigungseskalationen </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Zum Anfang</a></td>
<td width="40%" align="right" valign="top"> 7.11. Bereitschafts-Rotation</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>
|