> Hi.
> 
> Has anyone managed to get pnp4nagios graphs working with Icinga2?
Hey,

yes I did. I followed in large parts
https://www.thomas-krenn.com/de/wiki/Icinga_2_Graphen_mit_PNP_unter_Ubuntu_14.04_Trusty#PNP-Konfiguration
and used the npcdmod as well. The plugin you want to install in Icinga2 is
called icingaweb2-module-pnp. You can find it on github. It'll set the
action_url's automatically, if I remember correctly.

I made a small guide for myself when I configured it. I'll c&p the whole thing,
so everybody who has the question again can already find guidance for the first
steps too.

Here is in short what I did:
Install PNP4Nagios
++++++++++++++++++
. aptitude install pnp4nagios rrdcached -R
. Modify /etc/default/rrdcached and create /var/cache/rrd/cached
. Modify /etc/pnp4nagios/{config.php,process_perfdata.cfg} 

See: Thomas Krenn link.

Enable icinga2 support
++++++++++++++++++++++
- icinga2 feature enable perfdata

There is a quite nice PerfdataWriter object already set by default from icinga2.

See:
/etc/icinga2/features-available/perfdata.conf


Enable support in icingaweb2
++++++++++++++++++++++++++++
. cd /usr/share/icingaweb2/modules/ 
. git clone https://github.com/Icinga/icingaweb2-module-pnp pnp
. In icingaweb2-Webinterface pnp activate module.

See:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/addons-plugins?highlight-search=pnp#addons-graphing-pnp

Enable access from Icingaweb2 to graphics
+++++++++++++++++++++++++++++++++++++++++
. vim /etc/pnp4nagios/apache.conf replace auth-stuff with
------------------------------------------------------
#    Allow from all
#    AuthName "PNP4Nagios Access"
#    AuthType Basic
#    AuthUserFile /etc/icinga2-classicui/htpasswd.users
#    Require valid-user
    Order allow,deny
    Allow from 127.0.0.1
    Allow from <you network goes here>
    satisfy any
------------------------------------------------------

Eventually add further templates for self-written scripts
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
. mkdir -pv /etc/icinga2/plugins/stunet
. ln -s /etc/pnp4nagios/templates /etc/icinga2/plugins/pnp4nagios_templates
. Create templates for Icinga2. 
_Context:_ Every plugin uses a php-Template to display check results.
pnp4nagios provides a great deal of predefined templates.
See: /usr/share/pnp4nagios/html/templates.dist/

Hope it helps already.

Best
H

> 
> I'm trying to follow the documentation at 
> http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/addons-
> plugins
> 
> My setup is:
> 
>  - Debian 7.10 64-bit
>  - Icinga 2.4.10 installed from debmon.org repository
>  - Icingaweb 2.3.2 installed from debmon repository
>  - pnp4nagios 0.6.19 installed from debmon repository
> 
> I've used pnp4nagios with Icinga1 for several years (and to be honest I think 
> it should be a standard part of the setup, it's so useful).
> 
> I've followed the instructions in paragraph 16.1.1 from the URL above:
> 
>  - install pnp4nagios package
>  - enable icinga2's perfdata feature
>  - restart icinga2
>  - set the perfdata_spool_dir for npcd
>  - restart npcd
> 
> I can confirm that I am getting data fed into the RRDs under 
> /var/lib/pnp4nagios/perfdata
> 
> I then get stuck.  The next sentence in the instructions is "There's also an 
> Icinga Web 2 module for direct PNP graph integration available at 
> https://exchange.icinga.org/icinga/PNP4Nagios"; - that URL gives me a 404 Not 
> Found.
> 
> The final sentence is "More information on action_url as attribute and graph 
> template names." which refers to paragraph 16.8.
> 
> It's not clear to me whether I should be following the instructions in 
> paragraph 16.8.1 (it says "Icinga Web 2 doesn't require the action url 
> attribute in its own module" - does that mean Icinga Web 2 doesn't require it 
> at all, or just that it doesn't have to be in its own module?)
> 
> Paragraph 16.8.2 seems to have incomplete instructions:
> 
>  - the "apply Service" stanza has no "assign" or "for" statement, so Icinga2 
> rightfully complains on reload
> 
>  - the sentence "If there are warnings about unresolved macros make sure to 
> specify a default value for vars.pnp_check_arg1 inside the" just stops there.
> 
> 
> So, can anyone point me at some guidelines to get pnp4nagios working with 
> Icinga2 and Icingaweb2?
> 
> 
> Thanks,
> 
> 
> Antony.
> 

_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to