File: perfgraphs.html

package info (click to toggle)
icinga 1.14.2%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 49,264 kB
  • sloc: ansic: 108,564; sql: 9,656; sh: 4,945; perl: 3,439; makefile: 1,213; php: 581; xml: 104
file content (461 lines) | stat: -rw-r--r-- 21,792 bytes parent folder | download
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>8.7. Graphing Performance Info With PNP4Nagios</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 Documentation">
<link rel="up" href="ch08.html" title="Chapter 8. Security and Performance Tuning">
<link rel="prev" href="icingastats.html" title="8.6. Using The Icingastats Utility">
<link rel="next" href="temp_data.html" title="8.8. Temporary Data">
<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">8.7. Graphing Performance Info With PNP4Nagios</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="icingastats.html">Prev</a> </td>
<th width="60%" align="center">Chapter 8. Security and Performance Tuning</th>
<td width="20%" align="right"> <a accesskey="n" href="temp_data.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="8.7. Graphing Performance Info With PNP4Nagios">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="perfgraphs"></a>8.7. <a name="perf_graphs"></a>Graphing Performance Info With PNP4Nagios</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">8.7.1. <a href="perfgraphs.html#introduction">Introduction</a></span></dt>
<dt><span class="section">8.7.2. <a href="perfgraphs.html#prerequisites">Prerequisites</a></span></dt>
<dt><span class="section">8.7.3. <a href="perfgraphs.html#avghostsvcchecklatency">Average Host / Service Check Latency</a></span></dt>
<dt><span class="section">8.7.4. <a href="perfgraphs.html#servicestatistics">Service Statistics</a></span></dt>
<dt><span class="section">8.7.5. <a href="perfgraphs.html#hoststatistics">Host Statistics</a></span></dt>
<dt><span class="section">8.7.6. <a href="perfgraphs.html#avgexecutiontimes">Average Execution Times</a></span></dt>
<dt><span class="section">8.7.7. <a href="perfgraphs.html#externalcommands">External Commands</a></span></dt>
<dt><span class="section">8.7.8. <a href="perfgraphs.html#externalcommandbuffers">External Command Buffers</a></span></dt>
<dt><span class="section">8.7.9. <a href="perfgraphs.html#idm140381622902304">Cached Host and Service Checks</a></span></dt>
<dt><span class="section">8.7.10. <a href="perfgraphs.html#avgstatechanges">Average State Changes</a></span></dt>
</dl></div>
  

  <div class="section" title="8.7.1. Introduction">
<div class="titlepage"><div><div><h3 class="title">
<a name="introduction"></a>8.7.1. Introduction</h3></div></div></div>
    

    <p>The <a class="link" href="icingastats.html" title="8.6. Using The Icingastats Utility">icingastats</a> utility allows you to graph various Icinga performance statistics over
    time using <a class="link" href="http://docs.pnp4nagios.org/pnp-0.6/start" target="_top">PNP4Nagios</a>. This is important because it can help you
    to:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p>Ensure Icinga is operating efficiently</p>
      </li>
<li class="listitem">
        <p>Locate problem areas in the monitoring process</p>
      </li>
<li class="listitem">
        <p>Observe the performance impacts of changes in your Icinga configuration</p>
      </li>
</ul></div>
  </div>

  <div class="section" title="8.7.2. Prerequisites">
<div class="titlepage"><div><div><h3 class="title">
<a name="prerequisites"></a>8.7.2. Prerequisites</h3></div></div></div>
    

    <p>PNP4Nagios is one of the most popular addons due to easy installation and little maintenance during operation. The documentation
    along with further links to download the software can be found at <a class="link" href="http://docs.pnp4nagios.org/pnp-0.6/start" target="_top">http://docs.pnp4nagios.org/pnp-0.6/start</a>.</p>

    <p><a class="link" href="https://www.monitoringexchange.org/inventory/Check-Plugins/Software/Nagios/check_nagiostats" target="_top">check_nagiostats</a> was
    published by <a class="link" href="http://www.nagios-portal.org/wbb/index.php?page=User&amp;userID=7773" target="_top">Jochen Bern</a> and can be
    called as an active service check or via crontab to submit passive check results. Despite its name it can be used for Icinga as
    well.</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p>After downloading the plugin and placing it into the plugin directory (e.g. <code class="filename">/usr/local/icinga/libexec</code> if
        you used the quickstart installation guides) you have to check the values of the configuration section within the script.</p>

        <div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
            <p>Most <span class="bold"><strong>important</strong></span> is "<code class="literal">EXEC=</code><code class="filename">/path/to/icingastats</code>"
            (e.g. <code class="filename">/usr/local/icinga/bin/icingastats</code>) pointing to the <code class="filename">icingastats</code> binary.</p>
          </li>
<li class="listitem">
            <p>Depending on your likings you may want to change the value of <code class="literal">CUMULATE</code> from "AVG" to "MIN" or "MAX",
            respectively. The setting of <code class="literal">TIMEFRAME</code> influences the timeperiod which will be used for cumulated values in
            the output of the plugin.</p>
          </li>
<li class="listitem">
            <p>Changing the values of <code class="literal">PASSIVE_EMERGENCY_HOST</code> and <code class="literal">PASSIVE_EMERGENCY_SERVICE</code>
            shouldn't be necessary because you pass the values as arguments to the script.</p>
          </li>
</ul></div>
      </li>
<li class="listitem">
        <p>You can call the plugin using active or passive checks</p>

        <div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
            <p>Active</p>

            <p>Make sure that your object configuration files contain a matching service definition such as</p>
<pre class="programlisting"> define service{
    host_name               &lt;the Icinga server&gt;
    service_description     icingastats # (or something appropriate)
    check_command           check_stats
    check_interval          1
    retry_interval          1
    ...
 }</pre>
<p>and a command definition</p>
<pre class="programlisting"> define command{
    command_name            check_stats
    command_line            $USER1$/check_nagiostats
 }</pre>
<p>Don't forget to restart Icinga after these changes.</p>
          </li>
<li class="listitem">
            <p>Passive</p>

            <p>Make sure that your object configuration files contain a matching service definition such as</p>
<pre class="programlisting"> define service{
    host_name               &lt;the Icinga server&gt;
    service_description     icingastats # (or something appropriate)
    active_checks_enabled   0
    check_command           check_stats!3!Freshness threshold exceeded
    check_freshness         1
    freshness_threshold     180         # check interval + x seconds
    ...
 }</pre>

            <p>and a command definition</p>

            <pre class="programlisting"> define command{
    command_name            check_stats
    command_line            $USER1$/check_dummy $ARG1$ $ARG2$
 }</pre>

            <p>Don't forget to restart Icinga after this change.</p>

            <p>Add a line to the crontab of the Icinga user which will call the <code class="filename">icingastats</code> binary and submit
            the results to the command pipe</p>
<pre class="programlisting"> * * * * * /usr/local/icinga/libexec/check_nagiostats --passive &lt;host&gt; icingastats &gt;&gt; /usr/local/icinga/var/rw/icinga.cmd</pre>
<p>
            This way the values are updated in regular intervals.</p>
          </li>
</ul></div>
      </li>
<li class="listitem">
        <p>Create a symbolic link in the (user) templates folder of PNP4Nagios</p>
<pre class="programlisting"> $&gt; ln -s ../templates.dist/nagiostats.php check_stats.php</pre>
<p>Make
        sure that <span class="emphasis"><em>check_stats</em></span> (without the extension .php) matches the value you specified as first parameter in the
        check_command.</p>
      </li>
</ul></div>

    <p><span class="bold"><strong>Example Graphs</strong></span></p>

    <p>We'll describe what the graphs produced by <code class="filename">check_nagiostats</code> mean and what they can be used for...</p>
  </div>

  <div class="section" title="8.7.3. Average Host / Service Check Latency">
<div class="titlepage"><div><div><h3 class="title">
<a name="avghostsvcchecklatency"></a>8.7.3. Average Host / Service Check Latency</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622966320"></a><p class="title"><b>Figure 8.1. Average Host / Service Check Latency</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_lat.png" alt="Average Host / Service Check Latency"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows the average latency times of hosts and services over time for both active and passive checks, respectively.
    Useful for understanding:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="hostchecks.html" title="5.4. Host Checks">Host checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="servicechecks.html" title="5.5. Service Checks">Service checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="activechecks.html" title="5.6. Active Checks">Active checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="passivechecks.html" title="5.7. Passive Checks">Passive checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="tuning.html" title="8.3. Tuning Icinga For Maximum Performance">Performance tuning</a></p>
      </li>
</ul></div>

    <p>Consistently high latencies can be an indication that one or more of the following variables need tweaking:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="configmain.html#configmain-max_concurrent_checks">max_concurrent_checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="configmain.html#configmain-check_result_reaper_frequency">check_result_reaper_frequency</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="configmain.html#configmain-max_check_result_reaper_time">max_check_result_reaper_time</a></p>
      </li>
</ul></div>
  </div>

  <div class="section" title="8.7.4. Service Statistics">
<div class="titlepage"><div><div><h3 class="title">
<a name="servicestatistics"></a>8.7.4. Service Statistics</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622949952"></a><p class="title"><b>Figure 8.2. Service Statistics</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_svc.png" alt="Service Statistics"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows the values for the several service states along with the average number of services being checked
    actively/passively within the timeperiod you specified. Useful for understanding:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="servicechecks.html" title="5.5. Service Checks">Service checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="dependencychecks.html" title="7.20. Predictive Dependency Checks">Predictive service dependency checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="cachedchecks.html" title="7.21. Cached Checks">Cached checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">Flap detection</a></p>
      </li>
</ul></div>
  </div>

  <div class="section" title="8.7.5. Host Statistics">
<div class="titlepage"><div><div><h3 class="title">
<a name="hoststatistics"></a>8.7.5. Host Statistics</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622939760"></a><p class="title"><b>Figure 8.3. Host Statistics</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_host.png" alt="Host Statistics"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows the values for the several host states along with the average number of hosts being checked actively/passively
    within the timeperiod you specified. Useful for understanding:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="hostchecks.html" title="5.4. Host Checks">Host checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="dependencychecks.html" title="7.20. Predictive Dependency Checks">Predictive host dependency checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="cachedchecks.html" title="7.21. Cached Checks">Cached checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">Flap detection</a></p>
      </li>
</ul></div>
  </div>

  <div class="section" title="8.7.6. Average Execution Times">
<div class="titlepage"><div><div><h3 class="title">
<a name="avgexecutiontimes"></a>8.7.6. Average Execution Times</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622929440"></a><p class="title"><b>Figure 8.4. Average Execution Times</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_exec.png" alt="Average Execution Times"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows the average execution times of hosts and services over time. Useful for understanding:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="hostchecks.html" title="5.4. Host Checks">Host checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="servicechecks.html" title="5.5. Service Checks">Service checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="tuning.html" title="8.3. Tuning Icinga For Maximum Performance">Performance tuning</a></p>
      </li>
</ul></div>

    <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
      <p>To be honest: We tweaked the graphs a bit, meaning the colours. Yellow is sometimes hard to distinguish from the background so
      we changed some lines in the PNP4Nagios template file <code class="filename">template.dist/nagiostats.php</code> from <code class="code">$i=0;</code> to
      <code class="code">$i=1;</code>.</p>
    </td></tr>
</table></div>

    <p><span class="bold"><strong>Additional graphs</strong></span></p>

    <p>Well, we tweaked the template a bit more because the plugin delivers the data but there aren't appropriate graphs (but looking at
    the template file it is very easy to add the lines if you really need the following graphs).</p>
  </div>

  <div class="section" title="8.7.7. External Commands">
<div class="titlepage"><div><div><h3 class="title">
<a name="externalcommands"></a>8.7.7. External Commands</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622916608"></a><p class="title"><b>Figure 8.5. External Commands</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_extcmd.png" alt="External Commands"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows how may external commands have been processed by the Icinga daemon over time. Unless you're processing a
    large number of external commands (as in the case with distributed monitoring setups), this graph may appear mostly empty. Monitoring
    external commands can be useful for understanding the impacts of:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="passivechecks.html" title="5.7. Passive Checks">Passive checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="distributed.html" title="7.6. Distributed Monitoring">Distributed monitoring</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="redundancy.html" title="7.7. Redundant and Failover Network Monitoring">Redundant/failover monitoring</a></p>
      </li>
</ul></div>
  </div>

  <div class="section" title="8.7.8. External Command Buffers">
<div class="titlepage"><div><div><h3 class="title">
<a name="externalcommandbuffers"></a>8.7.8. External Command Buffers</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622907920"></a><p class="title"><b>Figure 8.6. External Command Buffers</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_cmdbuf.png" alt="External Command Buffers"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows how many external command buffer slots are in use over time. If the number of used buffers is near the number of
    available buffers on a regular basis, it is likely you need to increase the available <a class="link" href="configmain.html#configmain-external_command_buffer_slots">external command buffer slots</a>. Each buffer slot can hold one external command.
    Buffers are used for temporarily holding external commands from the time they are read from the <a class="link" href="configmain.html#configmain-command_file">external command file</a> to the time they are processed by the Icinga daemon.</p>

    <p>As you can see just one buffer is used and that's the one for the graphs as mentioned above.</p>
  </div>

  <div class="section" title="8.7.9. Cached Host and Service Checks">
<div class="titlepage"><div><div><h3 class="title">
<a name="idm140381622902304"></a>8.7.9. Cached Host and Service Checks</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622901632"></a><p class="title"><b>Figure 8.7. Cached Host and Service Checks</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_cached.png" alt="Cached Host and Service Checks"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows how may cached host and service checks have occurred over time. Useful for understanding:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
        <p><a class="link" href="cachedchecks.html" title="7.21. Cached Checks">Cached checks</a></p>
      </li>
<li class="listitem">
        <p><a class="link" href="dependencychecks.html" title="7.20. Predictive Dependency Checks">Predictive host and service dependency checks</a></p>
      </li>
</ul></div>
  </div>

  <div class="section" title="8.7.10. Average State Changes">
<div class="titlepage"><div><div><h3 class="title">
<a name="avgstatechanges"></a>8.7.10. Average State Changes</h3></div></div></div>
    

    <div class="figure">
<a name="idm140381622894048"></a><p class="title"><b>Figure 8.8. Average State Changes</b></p>
<div class="figure-contents">
      

      <div class="mediaobject"><img src="../images/perfdata_state_chg.png" alt="Average State Changes"></div>
    </div>
</div>
<br class="figure-break">

    <p>This graph shows the average percent state change (a measure of volatility) over time, broken down by hosts and services that were
    last checked either actively or passively. Useful for understanding:</p>

    <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
        <p><a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">Flap detection</a></p>
      </li></ul></div>

    <a class="indexterm" name="idm140381622888976"></a>
  </div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="icingastats.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch08.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="temp_data.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">8.6. Using The Icingastats Utility </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> 8.8. Temporary Data</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>