File: adaptive.html

package info (click to toggle)
nagios2 2.6-2%2Betch5
  • links: PTS
  • area: main
  • in suites: etch
  • size: 6,856 kB
  • ctags: 4,475
  • sloc: ansic: 64,870; sh: 4,676; makefile: 787; perl: 722
file content (164 lines) | stat: -rw-r--r-- 6,729 bytes parent folder | download | duplicates (2)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Adaptive Monitoring</title>

<STYLE type="text/css">
<!--
        .Default { font-family: verdana,arial,serif; font-size: 8pt; }
        .PageTitle { font-family: verdana,arial,serif; font-size: 12pt; font-weight: bold; }
		TH.Command { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; background-color: #cbcbcb; }
		.CommandType { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
		.Command { font-family: verdana,arial,serif; font-size: 7pt; }
		.CommandNotes { font-family: verdana,arial,serif; font-size: 7pt; }
-->      
</STYLE>

</head>

<body bgcolor="#FFFFFF" text="black" class="Default">

<p>
<div align="center">
<h2 class="PageTitle">Adaptive Monitoring</h2>
</div>
</p>
<hr>

<p>
<strong><u>Introduction</u></strong>
</p>

<p>
Nagios allows you to change certain commands and host and service check attributes during runtime.  I'll refer to this feature as "adaptive monitoring".  Please note that the adaptive monitoring features found in Nagios will probably not be of much use to 99% of users, but they do allow you to do some neat things.
</p>

<p>
<strong><u>What Can Be Changed?</u></strong>
</p>

<p>
The following service check attributes can be changed during runtime:
</p>

<p>
<ul class="Default">
<li>Check command (and command arguments)</li>
<li>Event handler command (and command arguments)</li>
<li>Check interval</li>
<li>Max check attempts</li>
</ul>
</p>

<p>
The following host check attributes can be changed during runtime:
</p>

<p>
<ul class="Default">
<li>Check command (and command arguments)</li>
<li>Event handler command (and command arguments)</li>
<li>Check interval</li>
<li>Max check attempts</li>
</ul>
</p>

<p>
The following global attributes can be changed during runtime:
</p>

<p>
<ul class="Default">
<li>Global host event handler command (and command arguments)</li>
<li>Global service event handler command (and command arguments)</li>
</ul>
</p>

<p>
<strong><u>External Commands For Adaptive Monitoring</u></strong>
</p>

<p>
In order to change global or host- or service-specific attributes during runtime, you must submit the appropriate <a href="extcommands.html">external command</a> to Nagios via the <a href="commandfile.html">external command file</a>.  The table below lists the different attributes that may be changed during runtime, along with the external command to accomplish the job.
</p>

<p>
<strong>NOTE:</strong> When changing check commands or event handler commands, it is important to note that these commands must have been configured using <a href="xodtemplate.html#command">command definitions</a> before Nagios was started.  Any request to change an check or event event handler command to use a command which has not been defined is ignore.  Also of note, you specify command arguments along with the actual command name - just seperate individual arguments from the command name (and from each other) using bang (!) characters.  More information on how arguments in command definitions are processed during runtime can be found in the documentation on <a href="macros.html">macros</a>.
</p>

<table class="Default" border="1" cellspacing="0" cellpadding="5">
<tr><th class="Command">Attribute</th><th class="Command">External Command</th><th class="Command">Notes</th></tr>

<tr>
<td class="CommandType" nowrap>Service check command</td>
<td class="Command" nowrap>CHANGE_SVC_CHECK_COMMAND:<i>command_name</i></td>
<td class="CommandNotes">Changes the service's current check command to whatever you specify in the <i>command_name</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Service event handler</td>
<td class="Command" nowrap>CHANGE_SVC_EVENT_HANDLER:<i>command_name</i></td>
<td class="CommandNotes">Changes the service's current event handler command to whatever you specify in the <i>command_name</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Service check interval</td>
<td class="Command" nowrap>CHANGE_NORMAL_SVC_CHECK_INTERVAL:<i>interval</i></td>
<td class="CommandNotes">Changes the service's normal check interval to be whatever you specify in the <i>interval</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Service check retry interval</td>
<td class="Command" nowrap>CHANGE_RETRY_SVC_CHECK_INTERVAL:<i>interval</i></td>
<td class="CommandNotes">Changes the services' retry check interval to be whatever you specify in the <i>interval</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Max service check attempts</td>
<td class="Command" nowrap>CHANGE_MAX_SVC_CHECK_ATTEMPTS:<i>attempts</i></td>
<td class="CommandNotes">Changes the maximum number of check attempts for the service to whatever you specify in the <i>attempts</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Host check command</td>
<td class="Command" nowrap>CHANGE_HOST_CHECK_COMMAND:<i>command_name</i></td>
<td class="CommandNotes">Changes the host's current check command to whatever you specify in the <i>command_name</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Host event handler</td>
<td class="Command" nowrap>CHANGE_HOST_EVENT_HANDLER:<i>command_name</i></td>
<td class="CommandNotes">Changes the host's current event handler command to whatever you specify in the <i>command_name</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Host check interval</td>
<td class="Command" nowrap>CHANGE_NORMAL_HOST_CHECK_INTERVAL:<i>interval</i></td>
<td class="CommandNotes">Changes the host's check interval to be whatever you specify in the <i>interval</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Max host check attempts</td>
<td class="Command" nowrap>CHANGE_MAX_HOST_CHECK_ATTEMPTS:<i>attempts</i></td>
<td class="CommandNotes">Changes the maximum number of check attempts for the host to whatever you specify in the <i>attempts</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Global host event handler</td>
<td class="Command" nowrap>CHANGE_GLOBAL_HOST_EVENT_HANDLER;<i>command_name</i></td>
<td class="CommandNotes">Changes the current <a href="configmain.html#global_host_event_handler">global host event handler command</a> to whatever you specify in the <i>command_name</i> argument.</td>
</tr>

<tr>
<td class="CommandType" nowrap>Global service event handler</td>
<td class="Command" nowrap>CHANGE_GLOBAL_SVC_EVENT_HANDLER;<i>command_name</i></td>
<td class="CommandNotes">Changes the current <a href="configmain.html#global_service_event_handler">global service event handler command</a> to whatever you specify in the <i>command_name</i> argument.</td>
</tr>

</table>

<hr>

</body>
</html>