136 lines
4.3 KiB
HTML
136 lines
4.3 KiB
HTML
|
|
|
|
|
|
<h1><a name="pnp_web_frontend" id="pnp_web_frontend">PNP Web Frontend</a></h1>
|
|
<div class="level1">
|
|
|
|
<p>
|
|
|
|
The behaviour of the PNP Web-Frontend can be controlled through the config file <code>etc/config.php</code>. This file will be overwritten during updates of PNP as the paths and options are detected during <code>./configure</code>.
|
|
</p>
|
|
|
|
<p>
|
|
Own adjustments should be made in <code>etc/config_local.php</code>. If this file does not exist the file config.php can be taken as a guideline.
|
|
</p>
|
|
|
|
</div>
|
|
<!-- SECTION "PNP Web Frontend" [1-385] -->
|
|
<h2><a name="etcconfigphp" id="etcconfigphp">etc/config.php</a></h2>
|
|
<div class="level2">
|
|
|
|
<p>
|
|
|
|
Following the most important parameters:
|
|
</p>
|
|
|
|
<p>
|
|
The path to the RRDtool binary. Will be detected by <code>./configure</code>
|
|
|
|
</p>
|
|
<pre class="code"> $conf['rrdtool'] = "/usr/bin/rrdtool";</pre>
|
|
|
|
<p>
|
|
|
|
Height and width of the RRD graphs
|
|
|
|
</p>
|
|
<pre class="code"> $conf['graph_width'] = "500";
|
|
$conf['graph_height'] = "100";</pre>
|
|
|
|
<p>
|
|
|
|
Screen sizes may vary, pages sizes won't. The following two directives enable you to specify different sizes for the creation of PDFs. If they aren't specified the values of the graph sizes are taken.
|
|
|
|
</p>
|
|
<pre class="code"> $conf['pdf_width'] = "675";
|
|
$conf['pdf_height'] = "100";</pre>
|
|
|
|
<p>
|
|
|
|
Additional options passed with every call of RRDTool, for example <code>--slope-mode</code> to smooth the graphs
|
|
|
|
</p>
|
|
<pre class="code"> $conf['graph_opt'] = "";</pre>
|
|
|
|
<p>
|
|
|
|
The path to the RRD and <acronym title="Extensible Markup Language">XML</acronym> files created by <code>process_perfdata.pl</code>
|
|
|
|
</p>
|
|
<pre class="code"> $conf['rrdbase'] = "/usr/local/pnp4nagios/var/perfdata/";</pre>
|
|
|
|
<p>
|
|
|
|
The path to the config file for the <a href="/pnp-0.6/pages" class="wikilink1" title="pnp-0.6:pages">pages</a>.
|
|
|
|
</p>
|
|
<pre class="code"> $conf['page_dir'] = "/usr/local/pnp4nagios/etc/pages/";</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
PNP pages will be refreshed every n seconds
|
|
|
|
</p>
|
|
<pre class="code"> $conf['refresh'] = "90";</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
Max. age of RRD files in seconds. After reaching this value links to the graphs will be marked as inactive
|
|
|
|
</p>
|
|
<pre class="code"> $conf['max_age'] = 60*60*6;</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
|
|
Base <acronym title="Uniform Resource Locator">URL</acronym> to the Nagios CGIs
|
|
|
|
</p>
|
|
<pre class="code"> $conf['nagios_base'] = "/nagios/cgi-bin";</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
|
|
List of users who are allowed to view links to the services of the current host
|
|
|
|
</p>
|
|
<pre class="code"> $conf['allowed_for_service_links'] = "EVERYONE";</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
List of users who can view/access the host search field
|
|
|
|
</p>
|
|
<pre class="code"> $conf['allowed_for_host_search'] = "EVERYONE";</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
If PNP is called with a host only ( index.php?host=<myserver> ), the defined user is shown an overview of all services related to this host
|
|
|
|
</p>
|
|
<pre class="code"> $conf['allowed_for_host_overview'] = "EVERYONE";</pre>
|
|
<hr />
|
|
|
|
<p>
|
|
The periods of time the RRD graphs will show are determined using the array $views[]. The title and number of graphs can be specified globally in this place
|
|
</p>
|
|
<pre class="code">
|
|
$views[] = array('title' => 'One Hour', 'start' => (60*60) );
|
|
$views[] = array('title' => '4 Hours', 'start' => (60*60*4) );
|
|
$views[] = array('title' => '25 Hours', 'start' => (60*60*25) );
|
|
$views[] = array('title' => 'One Week', 'start' => (60*60*25*7) );
|
|
$views[] = array('title' => 'One Month', 'start' => (60*60*24*32) );
|
|
$views[] = array('title' => 'One Year', 'start' => (60*60*24*380) );
|
|
</pre>
|
|
|
|
<p>
|
|
You can add more views ($views[5], …) but please keep in mind that under normal circumstances ALL views you defined are shown.
|
|
</p>
|
|
|
|
<p>
|
|
<a href="/pnp-0.6/start" class="wikilink1" title="pnp-0.6:start">back to contents</a> | <a href="/pnp-0.6/timeranges" class="wikilink1" title="pnp-0.6:timeranges">timeranges</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
<!-- SECTION "etc/config.php" [386-] --> |