your Partner for Network Design and CMS

OS: Debian 9 (Stretch) x64 Minimal ISO file
VM: 1x vCPU Cores
RAM: 2GB (2048)


1. Change IP to Fix IP ----------------------------
2. change Hostname # hostnamectl set-hostname icinga2-00
# hostnamectl
3 some tools # apt install -y bash-completion
# apt install -y vim-nox
# echo set number >> ~/.vimrc
# apt install -y net-tools
# apt install -y apt-transport-https
#  apt install -y vim-icinga2 vim-addon-manager
#  vim-addon-manager -w install icinga2

    #  wget -O - https://packages.icinga.com/icinga.key | apt-key add -  
  this will install the newes Version

#  echo 'deb https://packages.icinga.com/debian icinga-stretch main' >/etc/apt/sources.list.d/icinga.list

#  echo 'deb-src https://packages.icinga.com/debian icinga-stretch main' >>/etc/apt/sources.list.d/icinga.list


Controll it:
#  vi /etc/apt/sources.list

deb http://packages.icinga.com/debian icinga-stretch main

deb-src http://packages.icinga.com/debian icinga-stretch main

    #  apt update -y  
4 Apache2 # apt install -y apache2  libapache2-mod-php7.0
5 PHP 7 # apt install -y php7.0-xml  php7.0-opcache  php7.0-xml  php7.0-mbstring  php7.0-json  php7.0-curl  php7.0-ldap  php7.0-cli  php7.0-gd  php7.0-intl  php7.0-readline  php7.0-pgsql
6a PHP config # cp /etc/php/7.0/apache2/php.ini{,.backup}
# vi /etc/php/7.0/apache2/php.ini
max_execution_time 300
memory_limit 128M
max_input_time 300
date.timezone = Europe/Zurich
 6b add at the end of

7 Maria DB #  apt install -y mariadb-server  mariadb-client  php7.0-mysql
8 Enable and Restart it # systemctl enable apache2 mariadb
# systemctl start apache2 mariadb
# systemctl status apache2 mariadb
 9a change MySQL 

#  mysql -h localhost

use mysql;
update user set plugin='' where user='root';
flush privileges;

9b Create MySQL database for Icinga2 # mysql_secure_installation
# mysql -u root -p
10   MariaDB [(none)]> create database icingadb;

grant all privileges on icingadb.* to 'icinga_user'@'localhost' identified by 'password';

create database icinga_users;

grant all privileges on icinga_users.* to 'icinga_user'@'localhost' identified by 'password';

flush privileges;

11 Installing Icinga2 #apt install -y  icinga2 icinga2-ido-mysql nagios-plugins

Enable Icinga 2 ido mysql Feature [YES]

Configure Database .... [NO]

12 Restart Icinga2 #  systemctl start icinga2.service
systemctl status icinga2.service
   enable ido-mysql icinga2 feature enable ido-mysql
systemctl start icinga2.service
systemctl status icinga2.service
13 Control IDO MySQL file   vi /etc/icinga2/features-enabled/ido-mysql.conf should be like on step 10
14 Enabling the Feature list #  icinga2 feature list
icinga2 feature enable command

15 Installing Icinga Web2 Plugin apt install -y icingaweb2 icingacli  
16 Enable and Restart it systemctl restart icinga2.service
systemctl status icinga2.service
systemctl restart apache2
17 MySQL schema for Icinga database mysql -u root icingadb -p < /usr/share/icinga2-ido-mysql/schema/mysql.sql  
18 installation token icingacli setup token create

icingacli setup token show
19 GUI Configuration or your IP
19.1 1: Setting up the Token   add the Token from step 18
19.2 2: Selecting the Icinga Web2 Modules   Select [ DOC ] and [ Monitroing ]
19.3 3: Verifying the PHP settings   [next]
19.04 4: Authenticating Methods   Select [Database]
19.05 5: Enter the Database details  

Resourse Typ
DB: Icinga_users
user icinga_user
Pwd (from Step 10

19.6 Authentification Backend icingaweb2 [next]
19.7 7: Creating Icinga Web administration logins   define as you like
19.8 back to command line mkdir -p /var/log/icingaweb2/
chgrp -R icingaweb2 /var/log/icingaweb2/
chmod -R 775 /var/log/icingaweb2/
19.9 back to GUI
8: Choosing the Application configuration options

select like

file path should be the same like on step 19.8

Check Show Stacktraces
Storage Type = Database
Logging Type = File
Logging Level = Error
File path = /var/log/icingaweb2/icingaweb2.log
19.10 9: Reviewing all chosen settings   [next]
19.11 10: Configuring Monitoring Module  

Welcome ..... [ NEXT ]

Monitoring Backend
select [ IDO ]

[ NEXT ]


Monitoring IDO Resources
pwd Step 10


19.13 Command Transport

Transport Name = icinga2
Transport Type = Local Command File
Command File = /var/run/icinga2/cmd/icinga2.cmd

[ NEXT ]

19.14 Monitoring Security   [ NEXT ]
19.15 11: Reviewing the Monitoring module configuration options  

[ Finish ]


[ Login to Icinga Web 2 ] Step 19.7


Some more Information to improve Icinga2:



- www.monitoring-portal.org
- How to Install Icinga 2 and Icinga Web 2 on Debian 9.3
How to Install Icinga 2 Monitoring Tool on Debian 9.2
- icingaweb2-module-graphite / doc / 02-Installation.md  
- Thomas Krenn | Icinga Web 2 mit Icinga 2 verwenden




Learning Network

Seti@home & Boinc




Who is Online

We have 222 guests and no members online

We have 224 guests, no bots and no members online