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:
1 2 |
#ICINGA deb http://debmon.org/debmon debmon-wheezy main |
Repository key:
1 |
wget -O - http://debmon.org/debmon/repo.key 2>/dev/null | apt-key add - |
Now run:
1 |
apt-get update && apt-get -y upgrade |
If there was a kernel upgrade (like in my case), reboot the server before proceeding to the next step.
Icinga and nagios plugins
1 |
apt-get install icinga2 nagios-plugins -y |
1 2 3 4 |
root@icinga-mon:~# /etc/init.d/icinga2 start [ ok ] checking Icinga2 configuration. [ ok ] Starting icinga2 monitoring daemon: icinga2. root@icinga-mon:~# |
Install MySQL and IDO-MySQL
1 2 |
apt-get install mysql-server aptitude install icinga2-ido-mysql -y |
And enable manually ido-mysql:
1 2 3 |
root@icinga-mon:/etc/icinga2# icinga2 feature enable ido-mysql Enabling feature ido-mysql. Make sure to restart Icinga 2 for these changes to take effect. root@icinga-mon:/etc/icinga2# /etc/init.d/icinga2 restart |
Icinga Web
1 |
apt-get install icinga-web -y |
Choose 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
1 |
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:
1 |
/usr/share/icinga-web/app/config/databases.xml |
Line 39:
1 |
<ae:parameter name="dsn">mysql://icinga_web:icinga_web@localhost:3306/icinga_web</ae:parameter> |
Change with data from:
1 |
/etc/icinga-web/conf.d/database-web.xml |
Line 90:
1 |
<ae:parameter name="dsn">mysql://icinga:icinga@localhost:3306/icinga</ae:parameter> |
Change with data from:
1 |
/etc/icinga2/features-available/ido-mysql.conf |
Ingraph
1 |
apt-get install ingraph -y |
In the next part of this tutorial we’ll go through configuration for new hosts and services.
Latest posts by Hans Kohl (see all)
- Facebook Privacy: Chats Are Being Scanned By A CIA Funded Company - April 14, 2015
- Installing Icinga2 (fork of Nagios) on Debian 7 (Wheezy) - March 19, 2015