45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
|
|
|
|
|
|
<h1><a name="data_export" id="data_export">Data export</a></h1>
|
|
<div class="level1">
|
|
|
|
<p>
|
|
|
|
PNP provides access to RRD data using the <code>xport</code> controller. The output format can be specified. At the moment the formats <code>xml</code>, <code>json</code> and <code>csv</code> are supported.
|
|
</p>
|
|
|
|
<p>
|
|
The controller can be called using the <acronym title="Uniform Resource Locator">URL</acronym>
|
|
|
|
</p>
|
|
<pre class="code">/pnp4nagios/xport/<format>?host=<hostname>&srv=<servicedesc></pre>
|
|
|
|
<p>
|
|
|
|
whereas <format> has to be replaced with the desired format.
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You can also use <code>wget</code> to generate images and place them in periodic reports. One example may be:
|
|
</p>
|
|
<pre class="code">wget -O image.png 'http://<user>:<pass>@<nagios-server>/pnp4nagios/image?host=<hostname>&srv=<service>&view=2&source=0'</pre>
|
|
|
|
<p>
|
|
<code>view=<n></code> limits the graph to the timeperiod specified in config.php <br/>
|
|
|
|
<code>source=<n></code> only shows one data source if you have more than one in your RRD file
|
|
</p>
|
|
|
|
<p>
|
|
Instead of <code>view</code> you can use <code>start</code> and/or <code>end</code> to specify the time period. For details please look at <a href="/pnp-0.6/timeranges" class="wikilink1" title="pnp-0.6:timeranges">"time ranges"</a>.
|
|
</p>
|
|
|
|
<p>
|
|
<a href="/pnp-0.6/start" class="wikilink1" title="pnp-0.6:start">back to contents</a> | <a href="/pnp-0.6/tpl" class="wikilink1" title="pnp-0.6:tpl">templates</a>
|
|
|
|
</p>
|
|
|
|
</div>
|