Icinga2

= Introduction =

Icinga2 is similar to Icinga and Nagios and was officially released in 2014. It enables monitoring of hosts and services. This includes:


 * A host you own running Gentoo Linux, e.g. a server at home
 * A remote host you have access to, offering Icinga2 services
 * Any remote host offering services like SSH or HTTP, not running any part of Icinga2

= Installation =

Gentoo Host
The following steps setup Icinga2-monitoring with web interface on a host running Gentoo. The Icinga2-service can then be used to monitor remote hosts, too. But the focus is on monitoring of the Icinga2-enabled host. PostgreSQL is the authentication backend and will hold monitoring data, too.

Packages:
 * postgresql
 * icinga2
 * monitoring-plugins
 * icingaweb2

Optional:


 * lm-sensors for hardware monitoring

What will be monitored out of the box:


 * /proc statistics, load
 * mounted volumes/ disks
 * HTTP-endpoints
 * validity of TLS-certificates

Add apache user to group icingaweb2 so resources can be accessed:

PostGreSQL:

Configure DB-access:

IcingaWeb2
PostGreSQL:


 * use /usr/share/icingaweb2/bin/icingacli
 * create token
 * configure rest through web interface

Hardware Monitoring through lm-sensors

 * broken configuration, see
 * create local shell script
 * setup CheckCommand manually

Graphs through pnp4nagios

 * Package: net-analyzer/pnp4nagios, USE=-nagios icinga
 * Package: www-apps/icingaweb2-module-pnp4nagios
 * module pnp must be enabled in icinga2web
 * /etc/icinga2/features-enabled +perfdata.conf (issues with icingacli, must be done as root/ manually)
 * filling perfdata.conf is a bit fragile, default paths after installation don't match between icinga2 and npcd ingester

Not running out of the box:


 * https://github.com/lingej/pnp4nagios/issues/148