pnp4nagios/share/pnp/documents/en_US/verify_pnp_config.html

136 lines
5.7 KiB
HTML
Raw Normal View History

2017-05-20 15:26:21 +02:00
<h1><a name="verify_pnp_config" id="verify_pnp_config">verify_pnp_config</a></h1>
<div class="level1">
<p>
In case of problems there is a script called <code>verify_pnp_config.pl</code> located on <a href="http://verify.pnp4nagios.org" class="urlextern" title="http://verify.pnp4nagios.org" rel="nofollow">http://verify.pnp4nagios.org</a>. It enables you to check the configuration settings as well as performance data of hosts or services. It can be used prior and during runtime of PNP.
</p>
2017-10-20 17:10:51 +02:00
<p>
<strong>* ATTENTION </strong>*: It ONLY supports verifying Nagios 3.x and Icinga 1.x as Monitoring core.
</p>
2017-05-20 15:26:21 +02:00
</div>
2017-10-20 17:10:51 +02:00
<!-- SECTION "verify_pnp_config" [1-385] -->
2017-05-20 15:26:21 +02:00
<h2><a name="download" id="download">Download</a></h2>
<div class="level2">
<pre class="code">
wget http://verify.pnp4nagios.org/verify_pnp_config
</pre>
</div>
2017-10-20 17:10:51 +02:00
<!-- SECTION "Download" [386-476] -->
2017-05-20 15:26:21 +02:00
<h2><a name="test" id="test">Test</a></h2>
<div class="level2">
<p>
The verify script is located on <a href="http://verify.pnp4nagios.org" class="urlextern" title="http://verify.pnp4nagios.org" rel="nofollow">http://verify.pnp4nagios.org</a> and needs three start options
</p>
<ul>
<li class="level1"><div class="li"> <code>--mode</code> One of the modes described on <a href="/pnp-0.6/modes" class="wikilink1" title="pnp-0.6:modes">modes</a></div>
</li>
<li class="level1"><div class="li"> <code>--config</code> Location of nagios.cfg or icinga.cfg</div>
</li>
<li class="level1"><div class="li"> <code>--pnpcfg</code> Path to PNP´s etc directory</div>
</li>
</ul>
<p>
Calling <code>perl verify_pnp_config</code> will show the available options.
</p>
<p>
The following is a sample run
</p>
<pre class="code">
lenny:~# perl verify_pnp_config --mode npcdmod --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc
[INFO] ========== Starting Environment Checks ============
[INFO] My version is: verify_pnp_config-0.6.14-R.31
[INFO] Reading /usr/local/nagios/etc/nagios.cfg
[OK ] Running product is &#039;nagios&#039;
[OK ] object_cache_file is defined
[OK ] object_cache_file=/usr/local/nagios/var/objects.cache
[INFO] Reading /usr/local/nagios/var/objects.cache
[OK ] resource_file is defined
[OK ] resource_file=/usr/local/nagios/etc/resource.cfg
[INFO] Reading /usr/local/nagios/etc/resource.cfg
[INFO] Reading /usr/local/pnp4nagios/etc/process_perfdata.cfg
[INFO] Reading /usr/local/pnp4nagios/etc/pnp4nagios_release
[OK ] Found PNP4Nagios version &quot;0.6.14&quot;
[OK ] Effective User is &#039;nagios&#039;
[OK ] User nagios exists with ID &#039;1000&#039;
[OK ] Effective group is &#039;nagios&#039;
[OK ] Group nagios exists with ID &#039;1000&#039;
[INFO] ========== Checking npcdmod Mode Config ============
[OK ] process_performance_data is 1 compared with &#039;/1/&#039;
[OK ] event_broker_options is defined
[OK ] event_broker_options=-1
[OK ] event_broker_option bits 2 and 3 enabled (12)
[OK ] broker_module is defined
[OK ] broker_module=/usr/local/pnp4nagios/lib/npcdmod.o config_file=/usr/local/pnp4nagios/etc/npcd.cfg
[OK ] npcdmod.o config file is /usr/local/pnp4nagios/etc/npcd.cfg
[OK ] /usr/local/pnp4nagios/etc/npcd.cfg used by npcdmod.o is readable
[OK ] npcd daemon is running
[OK ] /usr/local/pnp4nagios/etc/npcd.cfg is used by npcd and readable
[OK ] npcd and npcdmod.o are using the same config file (/usr/local/pnp4nagios/etc/npcd.cfg)
[INFO] Nagios config looks good so far
[INFO] ========== Checking config values ============
[INFO] Reading /usr/local/pnp4nagios/etc/npcd.cfg
[OK ] Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable
[INFO] ========== Starting global checks ============
[OK ] status_file is defined
[OK ] status_file=/dev/shm/status.dat
[INFO] Reading /dev/shm/status.dat
[INFO] ==== Starting rrdtool checks ====
[OK ] RRDTOOL is defined
[OK ] RRDTOOL=/usr/bin/rrdtool
[OK ] /usr/bin/rrdtool is executable
[OK ] RRDtool 1.3.1 Copyright 1997-2008 by Tobias Oetiker &lt;tobi@oetiker.ch&gt;
[OK ] USE_RRDs is defined
[OK ] USE_RRDs=1
[OK ] Perl RRDs modules are loadable
[INFO] ==== Starting directory checks ====
[OK ] RRDPATH is defined
[OK ] RRDPATH=/usr/local/pnp4nagios/var/perfdata
[OK ] Perfdata directory &#039;/usr/local/pnp4nagios/var/perfdata&#039; exists
[WARN] 62 hosts/services are not providing performance data
[WARN] &#039;process_perf_data 1&#039; is set for 43 hosts/services which are not providing performance data!
[WARN] &#039;process_perf_data 0&#039; is set for 27 of your hosts/services
[OK ] &#039;process_perf_data 1&#039; is set for 243 of your hosts/services
[INFO] ==== System sizing ====
[OK ] 269 hosts/service objects defined
[INFO] ==== Check statistics ====
[WARN] Warning: 3, Critical: 0
[WARN] Checks finished...
</pre>
</div>
2017-10-20 17:10:51 +02:00
<!-- SECTION "Test" [477-3869] -->
2017-05-20 15:26:21 +02:00
<h2><a name="performance_data" id="performance_data">Performance data</a></h2>
<div class="level2">
<p>
Starting with <code>0.6.19-R.37</code> (2013-02-17) the script will accept the option <code>--object</code> (or <code>-o</code>) followed by a string to specify a host name and/or service description to additionally show performance data (if any) of the object(s) found. The data is enclosed in brackets, followed by the value of the directive <code>process_performance_data</code> (<code>ppd</code>=n).
</p>
<p>
<code>host</code> = show performance information for host <code>host</code> <br/>
<code>;service</code> = show performance information for service <code>service</code> <br/>
<code>host;service</code> = show performance information for service <code>service</code> on host <code>host</code>
</p>
<p>
The strings are taken as regular expressions (perl syntax).
</p>
</div>
2017-10-20 17:10:51 +02:00
<!-- SECTION "Performance data" [3870-] -->