~yolanda.robla/ubuntu/saucy/nagios3/dep-8-tests

« back to all changes in this revision

Viewing changes to html/docs/objecttricks.html

  • Committer: Package Import Robot
  • Author(s): Alexander Wirt
  • Date: 2012-06-16 09:05:19 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20120616090519-ne14zejkhhyboolc
Tags: 3.4.1-1
* [28e077b] Imported Upstream version 3.3.1
* [d5314e0] don't call updatepo in clean target
* [45b3eb9] Don't remove config foo
* [54e3dff] Don't fix permissions in cgi postinst
* [d7be9db] Build-depend on libpng-dev (Closes: #662441)
* [4c47006] Add dutch po translation (Closes: #654855)
* [2b6573b] Refresh 10_p1_pl_shebang.dpatch
* [316fd7a] Update 40_fix_spurious_dollar_signs_added_to_command_lines
* [5ff2780] Refresh 55_strip_logarchivepath.dpatch
* [811d269] Refresh 60_fix_p1.pl_patch_mini_epn.dpatch
* [39a1e9c] Remove now unneeded patch 98_fix_XSS_CVE-2011-2179
* [785a4e8] Remove unneded patch 99_fix_XSS_CVE-2011-1523
* [6ce98ef] Remove unneeded patchs from 00list
* [1d18266] Imported Upstream version 3.4.0
* [05584c8] Refresh patches
* [58098cd] Imported Upstream version 3.4.1
* [3e9e07a] Bump standards version
* [fe991e2] wrap-and-sort
* [1ba78f7] Also create /var/run/nagios in cgi package (Closes: #626854)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
 
 
3
 
 
4
 
 
5
 
<html>
6
 
 
7
 
<head>
8
 
 
9
 
<title>Time-Saving Tricks For Object Definitions</title>
10
 
 
11
 
 
12
 
 
13
 
<STYLE type="text/css">
14
 
 
15
 
<!--
16
 
 
17
 
        .Default { font-family: verdana,arial,serif; font-size: 8pt; }
18
 
 
19
 
        .PageTitle { font-family: verdana,arial,serif; font-size: 16pt; font-weight: bold; }
20
 
 
21
 
-->      
22
 
 
23
 
</STYLE>
24
 
 
25
 
 
26
 
 
27
 
</head>
28
 
 
29
 
 
30
 
 
31
 
<body bgcolor="#FFFFFF" text="black" class="Default">
32
 
 
33
 
 
34
 
 
35
 
<div align="center">
36
 
 
37
 
<img src="images/nagios.jpg" border="0" alt="Nagios" title="Nagios">
38
 
 
39
 
<h1 class="PageTitle">Time-Saving Tricks For Object Definitions</h1>
40
 
 
41
 
or...<br>
42
 
 
43
 
<b>"How To Preserve Your Sanity"</b>
44
 
 
45
 
</div>
46
 
 
47
 
 
48
 
 
49
 
<hr>
50
 
 
51
 
 
52
 
 
53
 
<p>
54
 
 
55
 
<img src="images/upto.gif" border="0" align="middle" alt="Up To" title="Up To">Up To: <a href="toc.html">Contents</a><br>
56
 
 
57
 
<img src="images/seealso.gif" border="0" align="middle" alt="See Also" title="See Also"> See Also: <a href="objectdefinitions.html">Object Configuration</a>, <a href="objectinheritance.html">Object Inheritance</a>
58
 
 
59
 
</p>
60
 
 
61
 
 
62
 
 
63
 
<p>
64
 
 
65
 
<strong><u>Introduction</u></strong>
66
 
 
67
 
</p>
68
 
 
69
 
 
70
 
 
71
 
<p>
72
 
 
73
 
This documentation attempts to explain how you can exploit the (somewhat) hidden features of <a href="objectdefinitions.html">template-based object definitions</a> to save your sanity.  How so, you ask?  Several types of objects allow you to specify multiple host names and/or hostgroup names in definitions, allowing you to "copy" the object defintion to multiple hosts or services.  I'll cover each type of object that supports these features seperately.  For starters, the object types which support this time-saving feature are as follows:
74
 
 
75
 
</p>
76
 
 
77
 
 
78
 
 
79
 
<ul>
80
 
 
81
 
<li><a href="#service">Services</a>
82
 
 
83
 
<li><a href="#serviceescalation">Service escalations</a>
84
 
 
85
 
<li><a href="#servicedependency">Service dependencies</a>
86
 
 
87
 
<li><a href="#hostescalation">Host escalations</a>
88
 
 
89
 
<li><a href="#hostdependency">Host dependencies</a>
90
 
 
91
 
<li><a href="#hostgroup">Hostgroups</a>
92
 
 
93
 
</ul>
94
 
 
95
 
 
96
 
 
97
 
<p>
98
 
 
99
 
Object types that are not listed above (i.e. timeperiods, commands, etc.) do not support the features I'm about to describe.
100
 
 
101
 
</p>
102
 
 
103
 
 
104
 
 
105
 
<p>
106
 
 
107
 
<strong><u>Regular Expression Matching</u></strong>
108
 
 
109
 
</p>
110
 
 
111
 
 
112
 
 
113
 
<p>
114
 
 
115
 
The examples I give below use "standard" matching of object names
116
 
 
117
 
  and <b>*require*</b> <a href="configmain.html#use_regexp_matching">use_regexp_matching</a> to be <b>*disabled*</b>.  
118
 
 
119
 
 </p>
120
 
 
121
 
 
122
 
 
123
 
<p>  
124
 
 
125
 
If you wish, you can enable regular expression matching for object names by using the <a href="configmain.html#use_regexp_matching">use_regexp_matching</a> config option.  By default, regular expression matching will only be used in object names that contain <b>*</b>, <b>?</b>, <b>+</b>, or <b>\.</b>.  If you want regular expression matching to be used on all object names, enable the <a href="configmain.html#use_true_regexp_matching">use_true_regexp_matching</a> config option.  Regular expressions can be used in any of the fields used in the examples below (host names, hostgroup names, service names, and servicegroup names).
126
 
 
127
 
</p>
128
 
 
129
 
 
130
 
 
131
 
<p>
132
 
 
133
 
<img src="images/note.gif" border="0" align="bottom" alt="Note" title="Note"> Note: Be careful when enabling regular expression matching - you may have to change your config file, since some directives that you might not want to be interpreted as a regular expression just might be!  Any problems should become evident once you verify your configuration.
134
 
 
135
 
</p>
136
 
 
137
 
 
138
 
 
139
 
<br><br>
140
 
 
141
 
 
142
 
 
143
 
<a name="service"></a>
144
 
 
145
 
<p>
146
 
 
147
 
<strong><u>Service Definitions</u></strong>
148
 
 
149
 
</p>
150
 
 
151
 
 
152
 
 
153
 
<p>
154
 
 
155
 
<b>Multiple Hosts:</b><br> If you want to create identical <a href="objectdefinitions.html#service">services</a> that are assigned to multiple hosts, you can specify multiple hosts in the <i>host_name</i> directive.  The definition below would create a service called <i>SOMESERVICE</i> on hosts <i>HOST1</i> through <i>HOSTN</i>.  All the instances of the <i>SOMESERVICE</i> service would be identical (i.e. have the same check command, max check attempts, notification period, etc.).
156
 
 
157
 
</p>
158
 
 
159
 
 
160
 
 
161
 
<pre>
162
 
 
163
 
        define <i>service</i>{
164
 
 
165
 
                <font color="red">host_name             <i>HOST1,HOST2,HOST3,...,HOSTN</i></font>
166
 
 
167
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
168
 
 
169
 
                <i>other service directives</i> ...
170
 
 
171
 
                }
172
 
 
173
 
</pre>
174
 
 
175
 
 
176
 
 
177
 
 
178
 
 
179
 
<p>
180
 
 
181
 
<b>All Hosts In Multiple Hostgroups:</b><br>If you want to create identical services that are assigned to all hosts in one or more hostgroups, you can do so by creating a single service definition.  How?  The <i>hostgroup_name</i> directive allows you to specify the name of one or more hostgroups that the service should be created for.  The definition below would create a service called <i>SOMESERVICE</i> on all hosts that are members of hostgroups <i>HOSTGROUP1</i> through <i>HOSTGROUPN</i>.  All the instances of the <i>SOMESERVICE</i> service would be identical (i.e. have the same check command, max check attempts, notification period, etc.).
182
 
 
183
 
</p>
184
 
 
185
 
 
186
 
 
187
 
<pre>
188
 
 
189
 
        define <i>service</i>{
190
 
 
191
 
                <font color="red">hostgroup_name                <i>HOSTGROUP1,HOSTGROUP2,...,HOSTGROUPN</i></font>
192
 
 
193
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
194
 
 
195
 
                <i>other service directives</i> ...
196
 
 
197
 
                }
198
 
 
199
 
</pre>
200
 
 
201
 
 
202
 
 
203
 
<p>
204
 
 
205
 
<b>All Hosts:</b><br> If you want to create identical services that are assigned to all hosts that are defined in your configuration files, you can use a wildcard in the <i>host_name</i> directive.  The definition below would create a service called <i>SOMESERVICE</i> on <b>all hosts</b> that are defined in your configuration files.  All the instances of the <i>SOMESERVICE</i> service would be identical (i.e. have the same check command, max check attempts, notification period, etc.).
206
 
 
207
 
</p>
208
 
 
209
 
 
210
 
 
211
 
<pre>
212
 
 
213
 
        define <i>service</i>{
214
 
 
215
 
                <font color="red">host_name             <i>*</i></font>
216
 
 
217
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
218
 
 
219
 
                <i>other service directives</i> ...
220
 
 
221
 
                }
222
 
 
223
 
</pre>
224
 
 
225
 
 
226
 
 
227
 
<p>
228
 
 
229
 
<b>Excluding Hosts:</b><br>If you want to create identical services on numerous hosts or hostgroups, but would like to exclude some hosts from the definition, this can be accomplished by preceding the host or hostgroup with a ! symbol.
230
 
 
231
 
</p>
232
 
 
233
 
 
234
 
 
235
 
<pre>
236
 
 
237
 
        define <i>service</i>{
238
 
 
239
 
                <font color="red">host_name             <i>HOST1,HOST2,!HOST3,!HOST4,...,HOSTN</i></font>
240
 
 
241
 
                <font color="red">hostgroup_name                <i>HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN</i></font>
242
 
 
243
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
244
 
 
245
 
                <i>other service directives</i> ...
246
 
 
247
 
                }
248
 
 
249
 
</pre>
250
 
 
251
 
 
252
 
 
253
 
<br><br>
254
 
 
255
 
 
256
 
 
257
 
<a name="serviceescalation"></a>
258
 
 
259
 
<p>
260
 
 
261
 
<strong><u>Service Escalation Definitions</u></strong>
262
 
 
263
 
</p>
264
 
 
265
 
 
266
 
 
267
 
<p>
268
 
 
269
 
<b>Multiple Hosts:</b><br> If you want to create <a href="objectdefinitions.html#serviceescalation">service escalations</a> for services of the same name/description that are assigned to multiple hosts, you can specify multiple hosts in the <i>host_name</i> directive.  The definition below would create a service escalation for services called <i>SOMESERVICE</i> on hosts <i>HOST1</i> through <i>HOSTN</i>.  All the instances of the service escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
270
 
 
271
 
</p>
272
 
 
273
 
 
274
 
 
275
 
<pre>
276
 
 
277
 
        define <i>serviceescalation</i>{
278
 
 
279
 
                <font color="red">host_name             <i>HOST1,HOST2,HOST3,...,HOSTN</i></font>
280
 
 
281
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
282
 
 
283
 
                <i>other escalation directives</i> ...
284
 
 
285
 
                }
286
 
 
287
 
</pre>
288
 
 
289
 
 
290
 
 
291
 
 
292
 
 
293
 
<p>
294
 
 
295
 
<b>All Hosts In Multiple Hostgroups:</b><br> If you want to create service escalations for services of the same name/description that are assigned to all hosts in in one or more hostgroups, you can do use the <i>hostgroup_name</i> directive.  The definition below would create a service escalation for services called <i>SOMESERVICE</i> on all hosts that are members of hostgroups <i>HOSTGROUP1</i> through <i>HOSTGROUPN</i>.  All the instances of the service escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
296
 
 
297
 
</p>
298
 
 
299
 
 
300
 
 
301
 
<pre>
302
 
 
303
 
        define <i>serviceescalation</i>{
304
 
 
305
 
                <font color="red">hostgroup_name                <i>HOSTGROUP1,HOSTGROUP2,...,HOSTGROUPN</i></font>
306
 
 
307
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
308
 
 
309
 
                <i>other escalation directives</i> ...
310
 
 
311
 
                }
312
 
 
313
 
</pre>
314
 
 
315
 
 
316
 
 
317
 
<p>
318
 
 
319
 
<b>All Hosts:</b><br> If you want to create identical service escalations for services of the same name/description that are assigned to all hosts that are defined in your configuration files, you can use a wildcard in the <i>host_name</i> directive.  The definition below would create a service escalation for all services called <i>SOMESERVICE</i> on <b>all hosts</b> that are defined in your configuration files.  All the instances of the service escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
320
 
 
321
 
</p>
322
 
 
323
 
 
324
 
 
325
 
<pre>
326
 
 
327
 
        define <i>serviceescalation</i>{
328
 
 
329
 
                <font color="red">host_name             <i>*</i></font>
330
 
 
331
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
332
 
 
333
 
                <i>other escalation directives</i> ...
334
 
 
335
 
                }
336
 
 
337
 
</pre>
338
 
 
339
 
 
340
 
 
341
 
<p>
342
 
 
343
 
<b>Excluding Hosts:</b><br>If you want to create identical services escalations for services on numerous hosts or hostgroups, 
344
 
 
345
 
but would like to exclude some hosts from the definition, this can be accomplished by preceding the host or hostgroup with a ! symbol.
346
 
 
347
 
</p>
348
 
 
349
 
 
350
 
 
351
 
<pre>
352
 
 
353
 
        define <i>serviceescalation</i>{
354
 
 
355
 
                <font color="red">host_name             <i>HOST1,HOST2,!HOST3,!HOST4,...,HOSTN</i></font>
356
 
 
357
 
                <font color="red">hostgroup_name                <i>HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN</i></font>
358
 
 
359
 
                <font color="red">service_description   <i>SOMESERVICE</i></font>
360
 
 
361
 
                <i>other escalation directives</i> ...
362
 
 
363
 
                }
364
 
 
365
 
</pre>
366
 
 
367
 
  
368
 
 
369
 
<p>
370
 
 
371
 
<b>All Services On Same Host:</b><br> If you want to create <a href="objectdefinitions.html#serviceescalation">service escalations</a> for all services assigned to a particular host, you can use a wildcard in the <i>service_description</i> directive.  The definition below would create a service escalation for <b>all</b> services on host <i>HOST1</i>.  All the instances of the service escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
372
 
 
373
 
</p>
374
 
 
375
 
<p>
376
 
 
377
 
If you feel like being particularly adventurous, you can specify a wildcard in both the <i>host_name</i> and <i>service_description</i> directives.  Doing so would create a service escalation for <b>all services</b> that you've defined in your configuration files.
378
 
 
379
 
</p>
380
 
 
381
 
 
382
 
 
383
 
<pre>
384
 
 
385
 
        define <i>serviceescalation</i>{
386
 
 
387
 
                <font color="red">host_name             <i>HOST1</i></font>
388
 
 
389
 
                <font color="red">service_description   <i>*</i></font>
390
 
 
391
 
                <i>other escalation directives</i> ...
392
 
 
393
 
                }
394
 
 
395
 
</pre>
396
 
 
397
 
 
398
 
 
399
 
 
400
 
 
401
 
<p>
402
 
 
403
 
<b>Multiple Services On Same Host:</b><br> If you want to create <a href="objectdefinitions.html#serviceescalation">service escalations</a> for all multiple services assigned to a particular host, you can use a specify more than one service description in the <i>service_description</i> directive.  The definition below would create a service escalation for services <i>SERVICE1</i> through <i>SERVICEN</i> on host <i>HOST1</i>.  All the instances of the service escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
404
 
 
405
 
</p>
406
 
 
407
 
 
408
 
 
409
 
<pre>
410
 
 
411
 
        define <i>serviceescalation</i>{
412
 
 
413
 
                <font color="red">host_name             <i>HOST1</i></font>
414
 
 
415
 
                <font color="red">service_description   <i>SERVICE1,SERVICE2,...,SERVICEN</i></font>
416
 
 
417
 
                <i>other escalation directives</i> ...
418
 
 
419
 
                }
420
 
 
421
 
</pre>
422
 
 
423
 
 
424
 
 
425
 
<p>
426
 
 
427
 
<b>All Services In Multiple Servicegroups:</b><br> If you want to create service escalations for all services that belong in one or more servicegroups, you can do use the <i>servicegroup_name</i> directive.  The definition below would create service escalations for all services that are members of servicegroups <i>SERVICEGROUP1</i> through <i>SERVICEGROUPN</i>.  All the instances of the service escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
428
 
 
429
 
</p>
430
 
 
431
 
 
432
 
 
433
 
<pre>
434
 
 
435
 
        define <i>serviceescalation</i>{
436
 
 
437
 
                <font color="red">servicegroup_name             <i>SERVICEGROUP1,SERVICEGROUP2,...,SERVICEGROUPN</i></font>
438
 
 
439
 
                <i>other escalation directives</i> ...
440
 
 
441
 
                }
442
 
 
443
 
</pre>
444
 
 
445
 
 
446
 
 
447
 
<br><br>
448
 
 
449
 
 
450
 
 
451
 
<a name="servicedependency"></a>
452
 
 
453
 
<p>
454
 
 
455
 
<strong><u>Service Dependency Definitions</u></strong>
456
 
 
457
 
</p>
458
 
 
459
 
 
460
 
 
461
 
<p>
462
 
 
463
 
<b>Multiple Hosts:</b><br> If you want to create <a href="objectdefinitions.html#servicedependency">service dependencies</a> for services of the same name/description that are assigned to multiple hosts, you can specify multiple hosts in the <i>host_name</i> and or <i>dependent_host_name</i> directives.  In the example below, service <i>SERVICE2</i> on hosts <i>HOST3</i> and <i>HOST4</i> would be dependent on service <i>SERVICE1</i> on hosts <i>HOST1</i> and <i>HOST2</i>.  All the instances of the service dependencies would be identical except for the host names (i.e. have the same notification failure criteria, etc.).
464
 
 
465
 
</p>
466
 
 
467
 
 
468
 
 
469
 
<pre>
470
 
 
471
 
        define <i>servicedependency</i>{
472
 
 
473
 
                <font color="red">host_name                     <i>HOST1,HOST2</i></font>
474
 
 
475
 
                <font color="red">service_description           <i>SERVICE1</i></font>
476
 
 
477
 
                <font color="red">dependent_host_name           <i>HOST3,HOST4</i></font>
478
 
 
479
 
                <font color="red">dependent_service_description <i>SERVICE2</i></font>
480
 
 
481
 
                <i>other dependency directives</i> ...
482
 
 
483
 
                }
484
 
 
485
 
</pre>
486
 
 
487
 
 
488
 
 
489
 
<p>
490
 
 
491
 
<b>All Hosts In Multiple Hostgroups:</b><br> If you want to create service dependencies for services of the same name/description that are assigned to all hosts in in one or more hostgroups, you can do use the <i>hostgroup_name</i> and/or <i>dependent_hostgroup_name</i> directives.  In the example below, service <i>SERVICE2</i> on all hosts in hostgroups <i>HOSTGROUP3</i> and <i>HOSTGROUP4</i> would be dependent on service <i>SERVICE1</i> on all hosts in hostgroups <i>HOSTGROUP1</i> and <i>HOSTGROUP2</i>.  Assuming there were five hosts in each of the hostgroups, this definition would be equivalent to creating 100 single service dependency definitions!  All the instances of the service dependency would be identical except for the host names (i.e. have the same notification failure criteria, etc.).
492
 
 
493
 
</p>
494
 
 
495
 
 
496
 
 
497
 
<pre>
498
 
 
499
 
        define <i>servicedependency</i>{
500
 
 
501
 
                <font color="red">hostgroup_name                        <i>HOSTGROUP1,HOSTGROUP2</i></font>
502
 
 
503
 
                <font color="red">service_description           <i>SERVICE1</i></font>
504
 
 
505
 
                <font color="red">dependent_hostgroup_name      <i>HOSTGROUP3,HOSTGROUP4</i></font>
506
 
 
507
 
                <font color="red">dependent_service_description <i>SERVICE2</i></font>
508
 
 
509
 
                <i>other dependency directives</i> ...
510
 
 
511
 
                }
512
 
 
513
 
</pre>
514
 
 
515
 
 
516
 
 
517
 
<p>
518
 
 
519
 
<b>All Services On A Host:</b><br> If you want to create service dependencies for all services assigned to a particular host, you can use a wildcard in the <i>service_description</i> and/or <i>dependent_service_description</i> directives.  In the example below, <b>all services</b> on host <i>HOST2</i> would be dependent on <b>all services</b> on host <i>HOST1</i>.  All the instances of the service dependencies would be identical (i.e. have the same notification failure criteria, etc.).
520
 
 
521
 
</p>
522
 
 
523
 
 
524
 
 
525
 
<pre>
526
 
 
527
 
        define <i>servicedependency</i>{
528
 
 
529
 
                <font color="red">host_name                     <i>HOST1</i></font>
530
 
 
531
 
                <font color="red">service_description           <i>*</i></font>
532
 
 
533
 
                <font color="red">dependent_host_name           <i>HOST2</i></font>
534
 
 
535
 
                <font color="red">dependent_service_description <i>*</i></font>
536
 
 
537
 
                <i>other dependency directives</i> ...
538
 
 
539
 
                }
540
 
 
541
 
</pre>
542
 
 
543
 
 
544
 
 
545
 
<p>
546
 
 
547
 
<b>Multiple Services On A Host:</b><br> If you want to create service dependencies for multiple services assigned to a particular host, you can specify more than one service description in the <i>service_description</i> and/or <i>dependent_service_description</i> directives as follows:
548
 
 
549
 
</p>
550
 
 
551
 
 
552
 
 
553
 
<pre>
554
 
 
555
 
        define <i>servicedependency</i>{
556
 
 
557
 
                <font color="red">host_name                     <i>HOST1</i></font>
558
 
 
559
 
                <font color="red">service_description           <i>SERVICE1,SERVICE2,...,SERVICEN</i></font>
560
 
 
561
 
                <font color="red">dependent_host_name           <i>HOST2</i></font>
562
 
 
563
 
                <font color="red">dependent_service_description <i>SERVICE1,SERVICE2,...,SERVICEN</i></font>
564
 
 
565
 
                <i>other dependency directives</i> ...
566
 
 
567
 
                }
568
 
 
569
 
</pre>
570
 
 
571
 
 
572
 
 
573
 
<p>
574
 
 
575
 
<b>All Services In Multiple Servicegroups:</b><br> If you want to create service dependencies for all services that belong in one or more servicegroups, you can do use the <i>servicegroup_name</i> and/or <i>dependent_servicegroup_name</i> directive as follows:
576
 
 
577
 
</p>
578
 
 
579
 
 
580
 
 
581
 
<pre>
582
 
 
583
 
        define <i>servicedependency</i>{
584
 
 
585
 
                <font color="red">servicegroup_name             <i>SERVICEGROUP1,SERVICEGROUP2,...,SERVICEGROUPN</i></font>
586
 
 
587
 
                <font color="red">dependent_servicegroup_name   <i>SERVICEGROUP3,SERVICEGROUP4,...SERVICEGROUPN</i></font>
588
 
 
589
 
                <i>other dependency directives</i> ...
590
 
 
591
 
                }
592
 
 
593
 
</pre>
594
 
 
595
 
 
596
 
 
597
 
<a name="same_host_dependency"></a>
598
 
 
599
 
<p>
600
 
 
601
 
<b>Same Host Dependencies:</b><br> If you want to create service dependencies for multiple services that are dependent on services on the same host, leave the <i>dependent_host_name</i> and <i>dependent_hostgroup_name</i> directives empty.  The example below assumes that hosts <i>HOST1</i> and <i>HOST2</i> have at least the following four services associated with them: <i>SERVICE1</i>, <i>SERVICE2</i>, <i>SERVICE3</i>, and <i>SERVICE4</i>.  In this example, <i>SERVICE3</i> and <i>SERVICE4</i> on <i>HOST1</i> will be dependent on both <i>SERVICE1</i> and <i>SERVICE2</i> on <i>HOST1</i>.  Similiarly, <i>SERVICE3</i> and <i>SERVICE4</i> on <i>HOST2</i> will be dependent on both <i>SERVICE1</i> and <i>SERVICE2</i> on <i>HOST2</i>.
602
 
 
603
 
</p>
604
 
 
605
 
 
606
 
 
607
 
<pre>
608
 
 
609
 
        define <i>servicedependency</i>{
610
 
 
611
 
                <font color="red">host_name                     <i>HOST1,HOST2</i></font>
612
 
 
613
 
                <font color="red">service_description           <i>SERVICE1,SERVICE2</i></font>
614
 
 
615
 
                <font color="red">dependent_service_description <i>SERVICE3,SERVICE4</i></font>
616
 
 
617
 
                <i>other dependency directives</i> ...
618
 
 
619
 
                }
620
 
 
621
 
</pre>
622
 
 
623
 
 
624
 
 
625
 
<br><br>
626
 
 
627
 
 
628
 
 
629
 
<a name="hostescalation"></a>
630
 
 
631
 
<p>
632
 
 
633
 
<strong><u>Host Escalation Definitions</u></strong>
634
 
 
635
 
</p>
636
 
 
637
 
 
638
 
 
639
 
<p>
640
 
 
641
 
<b>Multiple Hosts:</b><br> If you want to create <a href="objectdefinitions.html#hostescalation">host escalations</a> for  multiple hosts, you can specify multiple hosts in the <i>host_name</i> directive.  The definition below would create a host escalation for hosts <i>HOST1</i> through <i>HOSTN</i>.  All the instances of the host escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
642
 
 
643
 
</p>
644
 
 
645
 
 
646
 
 
647
 
<pre>
648
 
 
649
 
        define <i>hostescalation</i>{
650
 
 
651
 
                <font color="red">host_name             <i>HOST1,HOST2,HOST3,...,HOSTN</i></font>
652
 
 
653
 
                <i>other escalation directives</i> ...
654
 
 
655
 
                }
656
 
 
657
 
</pre>
658
 
 
659
 
 
660
 
 
661
 
<p>
662
 
 
663
 
<b>All Hosts In Multiple Hostgroups:</b><br> If you want to create host escalations for all hosts in in one or more hostgroups, you can do use the <i>hostgroup_name</i> directive.  The definition below would create a host escalation on all hosts that are members of hostgroups <i>HOSTGROUP1</i> through <i>HOSTGROUPN</i>.  All the instances of the host escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
664
 
 
665
 
</p>
666
 
 
667
 
 
668
 
 
669
 
<pre>
670
 
 
671
 
        define <i>hostescalation</i>{
672
 
 
673
 
                <font color="red">hostgroup_name                <i>HOSTGROUP1,HOSTGROUP2,...,HOSTGROUPN</i></font>
674
 
 
675
 
                <i>other escalation directives</i> ...
676
 
 
677
 
                }
678
 
 
679
 
</pre>
680
 
 
681
 
 
682
 
 
683
 
<p>
684
 
 
685
 
<b>All Hosts:</b><br> If you want to create identical host escalations for all hosts that are defined in your configuration files, you can use a wildcard in the <i>host_name</i> directive.  The definition below would create a hosts escalation for <b>all hosts</b> that are defined in your configuration files.  All the instances of the host escalation would be identical (i.e. have the same contact groups, notification interval, etc.).
686
 
 
687
 
</p>
688
 
 
689
 
 
690
 
 
691
 
<pre>
692
 
 
693
 
        define <i>hostescalation</i>{
694
 
 
695
 
                <font color="red">host_name             <i>*</i></font>
696
 
 
697
 
                <i>other escalation directives</i> ...
698
 
 
699
 
                }
700
 
 
701
 
</pre>
702
 
 
703
 
 
704
 
 
705
 
<p>
706
 
 
707
 
<b>Excluding Hosts:</b><br>If you want to create identical host escalations on numerous hosts or hostgroups, but would like to
708
 
 
709
 
 exclude some hosts from the definition, this can be accomplished by preceding the host or hostgroup with a ! symbol.
710
 
 
711
 
</p>
712
 
 
713
 
 
714
 
 
715
 
<pre>
716
 
 
717
 
        define <i>hostescalation</i>{
718
 
 
719
 
                <font color="red">host_name             <i>HOST1,HOST2,!HOST3,!HOST4,...,HOSTN</i></font>
720
 
 
721
 
                <font color="red">hostgroup_name                <i>HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN</i></font>
722
 
 
723
 
                <i>other escalation directives</i> ...
724
 
 
725
 
                }
726
 
 
727
 
</pre>
728
 
 
729
 
 
730
 
 
731
 
<br><br>
732
 
 
733
 
 
734
 
 
735
 
<a name="hostdependency"></a>
736
 
 
737
 
<p>
738
 
 
739
 
<strong><u>Host Dependency Definitions</u></strong>
740
 
 
741
 
</p>
742
 
 
743
 
 
744
 
 
745
 
<p>
746
 
 
747
 
<b>Multiple Hosts:</b><br> If you want to create <a href="objectdefinitions.html#hostdependency">host dependencies</a> for  multiple hosts, you can specify multiple hosts in the <i>host_name</i> and/or <i>dependent_host_name</i> directives. The definition below would be equivalent to creating six seperate host dependencies.   In the example above, hosts <i>HOST3</i>, <i>HOST4</i> and <i>HOST5</i> would be dependent upon both <i>HOST1</i> and <i>HOST2</i>.  All the instances of the host dependencies would be identical except for the host names (i.e. have the same notification failure criteria, etc.).
748
 
 
749
 
</p>
750
 
 
751
 
 
752
 
 
753
 
<pre>
754
 
 
755
 
        define <i>hostdependency</i>{
756
 
 
757
 
                <font color="red">host_name             <i>HOST1,HOST2</i></font>
758
 
 
759
 
                <font color="red">dependent_host_name   <i>HOST3,HOST4,HOST5</i></font>
760
 
 
761
 
                <i>other dependency directives</i> ...
762
 
 
763
 
                }
764
 
 
765
 
</pre>
766
 
 
767
 
 
768
 
 
769
 
<p>
770
 
 
771
 
<b>All Hosts In Multiple Hostgroups:</b><br> If you want to create host escalations for all hosts in in one or more hostgroups, you can do use the <i>hostgroup_name</i> and /or <i>dependent_hostgroup_name</i> directives.  In the example below, all hosts in hostgroups <i>HOSTGROUP3</i> and <i>HOSTGROUP4</i> would be dependent on all hosts in hostgroups <i>HOSTGROUP1</i> and <i>HOSTGROUP2</i>.  All the instances of the host dependencies would be identical except for  host names (i.e. have the same notification failure criteria, etc.).
772
 
 
773
 
</p>
774
 
 
775
 
 
776
 
 
777
 
<pre>
778
 
 
779
 
        define <i>hostdependency</i>{
780
 
 
781
 
                <font color="red">hostgroup_name                        <i>HOSTGROUP1,HOSTGROUP2</i></font>
782
 
 
783
 
                <font color="red">dependent_hostgroup_name      <i>HOSTGROUP3,HOSTGROUP4</i></font>
784
 
 
785
 
                <i>other dependency directives</i> ...
786
 
 
787
 
                }
788
 
 
789
 
</pre>
790
 
 
791
 
 
792
 
 
793
 
<br><br>
794
 
 
795
 
 
796
 
 
797
 
<a name="hostgroup"></a>
798
 
 
799
 
<p>
800
 
 
801
 
<strong><u>Hostgroups</u></strong>
802
 
 
803
 
</p>
804
 
 
805
 
 
806
 
 
807
 
<p>
808
 
 
809
 
<b>All Hosts:</b><br> If you want to create a hostgroup that has all hosts that are defined in your configuration files as members, you can use a wildcard in the <i>members</i> directive.  The definition below would create a hostgroup called <i>HOSTGROUP1</i> that has <b>all hosts</b> that are defined in your configuration files as members.
810
 
 
811
 
</p>
812
 
 
813
 
 
814
 
 
815
 
<pre>
816
 
 
817
 
        define <i>hostgroup</i>{
818
 
 
819
 
                <i>hostgroup_name</i>           <i>HOSTGROUP1</i>
820
 
 
821
 
                <font color="red">members                       <i>*</i></font>
822
 
 
823
 
                <i>other hostgroup directives</i> ...
824
 
 
825
 
                }
826
 
 
827
 
</pre>
828
 
 
829
 
 
830
 
 
831
 
 
832
 
 
833
 
<hr>
834
 
 
835
 
 
836
 
 
837
 
</body>
838
 
 
839
 
</html>
840