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:

#ICINGA deb http://debmon.org/debmon debmon-wheezy main 1 2 #ICINGA deb http : //debmon.org/debmon debmon-wheezy main

Repository key:

wget -O - http://debmon.org/debmon/repo.key 2>/dev/null | apt-key add - 1 wget - O - http : / / debmon .org / debmon / repo .key 2 > / dev / null | apt - key add -

Now run:

apt-get update && apt-get -y upgrade 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

apt-get install icinga2 nagios-plugins -y 1 apt - get install icinga2 nagios - plugins - y

root@icinga-mon:~# /etc/init.d/icinga2 start [ ok ] checking Icinga2 configuration. [ ok ] Starting icinga2 monitoring daemon: icinga2. root@icinga-mon:~# 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 : ~ #

Starting the serviceWe also want icinga integration with the database.

Install MySQL and IDO-MySQL

apt-get install mysql-server aptitude install icinga2-ido-mysql -y 1 2 apt - get install mysql - server aptitude install icinga2 - ido - mysql - y

And enable manually ido-mysql:

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 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

apt-get install icinga-web -y 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

PDO Connection Error: SQLSTATE[28000] [1045] Access denied for user 'icinga'@'localhost' (using password: YES) 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:

/usr/share/icinga-web/app/config/databases.xml 1 / usr / share / icinga - web / app / config / databases . xml

Line 39:

Change with data from:

/etc/icinga-web/conf.d/database-web.xml 1 / etc / icinga - web / conf . d / database - web . xml

Line 90:

Change with data from:

/etc/icinga2/features-available/ido-mysql.conf 1 / etc / icinga2 / features - available / ido - mysql . conf

Ingraph

apt-get install ingraph -y 1 apt - get install ingraph - y

In the next part of this tutorial we’ll go through configuration for new hosts and services.









Share this: Facebook

Google

Twitter

Reddit

Pocket

Email

Print



Like this: Like Loading...