Contents
- 1 Preface
- 2 Prerequisits
- 3 Icinga and nagios plugins
- 4 Icinga Web
- 4.1 Hans Kohl
Preface
Icinga is a fork of Nagios monitoring system. There are lots of changes and upgrades compared to Nagios, especially in version 2. The main visible difference is UI which is built on ext js. Other significant differences are in hosts and services definitions (it will be covered in part 2).
For this tutorial we’re going to use Digital Ocean smallest droplet with installed Debian 7.8.
Prerequisits
We’ll use debmon repository
At the end of file “/etc/apt/source.list” add the following entry:
#ICINGAdeb http://debmon.org/debmon debmon-wheezy mainRepository key:
wget -O - http://debmon.org/debmon/repo.key 2>/dev/null | apt-key add -Now run:
apt-get update && apt-get -y upgradeIf there was a kernel upgrade (like in my case), reboot the server before proceeding to the next step.
Icinga and nagios plugins
apt-get install icinga2 nagios-plugins -yStarting the service
root@icinga-mon:~# /etc/init.d/icinga2 start[ ok ] checking Icinga2 configuration.[ ok ] Starting icinga2 monitoring daemon: icinga2.root@icinga-mon:~#We also want icinga integration with the database.
Install MySQL and IDO-MySQL
apt-get install mysql-serveraptitude install icinga2-ido-mysql -yAnd enable manually ido-mysql:
root@icinga-mon:/etc/icinga2# icinga2 feature enable ido-mysqlEnabling feature ido-mysql. Make sure to restart Icinga 2 for these changes to take effect.root@icinga-mon:/etc/icinga2# /etc/init.d/icinga2 restartIcinga Web
apt-get install icinga-web -yChoose dbconfig-common for db setup and it will prompt you for web interface password.
After the setup icinga-web will bi available on: http://SERVER/icinga-web/
username:root
password: (set during the installation)
There seems to be a bug in icinga-web package from debmon.
After checking with chrome inspect tool, the url with this issue was:
http://SERVER/icinga-web/modules/cronks/reloadStatus/json?_dc=1426770390818
PDO Connection Error: SQLSTATE[28000] [1045] Access denied for user 'icinga'@'localhost' (using password: YES)The issue is in config file that is (for some reason) used for db connection:
/usr/share/icinga-web/app/config/databases.xmlLine 39:
<ae:parameter name="dsn">mysql://icinga_web:[email protected]:3306/icinga_web</ae:parameter>Change with data from:
/etc/icinga-web/conf.d/database-web.xmlLine 90:
<ae:parameter name="dsn">mysql://icinga:[email protected]:3306/icinga</ae:parameter>Change with data from:
/etc/icinga2/features-available/ido-mysql.confIngraph
apt-get install ingraph -yIn the next part of this tutorial we’ll go through configuration for new hosts and services.
