Changes

From Amahi Wiki
Jump to: navigation, search
71 bytes removed ,  16:10, 17 July 2018
==== Classic Interface ====
Add the following lines to the top of ''/usr/local/icinga/etc/objects/templates.cfg''
{{Text|Text=
<pre><nowiki>define host{
name host-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
register 0
}</nowiki></pre>}}
Edit /usr/local/icinga/etc/objects/templates.cfg and within the ''generic-host'' definition add the following line underneath "''name generic-host''".
{{Text|Text=<pre><nowiki>use host-pnp</nowiki></pre>}}
Edit /usr/local/icinga/etc/objects/templates.cfg and within the ''generic-service'' definition add the following line underneath "''name generic-service''".
{{Text|Text=<pre><nowiki>use srv-pnp</nowiki></pre>}}
==== New Interface ====
First make backup copies of the configuration files you need to modify.
{{Code|<pre>
cd /usr/local/icinga-web/app/modules/Cronks/data/xml/grid/
cp icinga-host-template.xml icinga-host-template.bak
cp icinga-service-template.xml icinga-service-template.bak}}</pre>
Now edit ''icinga-host-template.xml'' and right before the line ''<field name="host_info">'' add the following following field definition.
{{Text|Text=
<pre><nowiki><field name="pnp4nagios_host_link">
<!-- datasource maps a data field from api call -->
<parameter name="enabled">false</parameter>
</order>
</field></nowiki></pre>}}
Edit ''icinga-service-template.xml'' and right before the line ''<field name="service_info">'' add the following following field definition.
{{Text|Text=
<pre><nowiki><field name="pnp4nagios_service_link">
<!-- datasource maps a data field from api call -->
<parameter name="enabled">false</parameter>
</order>
</field></nowiki></pre>}}
You now have to clear the Icinga Web cache to finalize applying the settings you changed.
{{Code|<pre>/usr/local/icinga-web/bin/clearcache.sh}}</pre>
12,424

edits