David Heidt's Blog

linux and webserver stuff

Installing Icinga and Pnp4nagios on Ubuntu 12.04 (Precise Pangolin)

| Comments

This is actually so easy and painless, I had to write this down:

I presume installing apache2 is no problem for you. This short tutorial covers a very minimalistic icinga installation, no idoutils, no distribution, no check_mk. So, let’s do it:

aptitude install icinga pnp4nagios

and follow debconf’s instructions

In /etc/icinga/icinga.cfg change the following variable

process_performance_data=1

and set this one:

broker_module=/usr/lib/pnp4nagios/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg

Now, edit /etc/default/npcd and set

RUN="yes"

finally, enable the views in icingas standard templates: for hosts, edit /etc/icinga/objects/generic-host_icinga.cfg and add

action_url  /pnp4nagios/graph?host=$HOSTNAME$

for services, edit /etc/icinga/objects/generic-service_icinga.cfg and add:

action_url  /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$

One last thing: change this line in /etc/apache2/conf.d/pnp4nagios.conf from the “nagios3” directory to “icinga”:

AuthUserFile /etc/icinga/htpasswd.users

finally, start npcd and restart icinga by executing

# service apache2 restart
# service npcd start
# service icinga restart

login to http://hostname/icinga with user icingaadmin and the password you specified. enjoy icinga with pnp4nagios!

One last hint: If you’re still using nagios and thinking about using icinga: Just copy your nagios config files to icinga and be much happier. In most cases this awesome fork works out of the box!

Comments