OS: Debian 9 (Stretch) x64 Minimal ISO file
 VM: 1x vCPU Cores
 RAM: 2GB (2048)
 HDD: 20GB
 
| 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
 | 
|
| # 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 
 
  | 
 Controll it: 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  php.ini  | 
opcache.enable=1  opcache.enable_cli=1 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.memory_consumption=128 opcache.save_comments=1 opcache.revalidate_freq=1  | 
|
| 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;  | 
|
| 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; quit  | 
|
| 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 | http://10.147.42.36/icingaweb2/setup | 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   | 
|
| 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 ] [ NEXT ]  | 
|
| 19.12 | 
 Monitoring IDO Resources 
  | 
||
| 19.13 | Command Transport | 
 Transport Name = icinga2  | 
 [ 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:
modul-icinga-articlelist
- ✔ Icinga2 | (spez)Plugins | define path
 - ✔ Icinga2 | add NAS-Qnap (check_qnap3)
 - ✔ icinga2 | check_ssl_cert
 - 01 ✔ Install graphite for incibaweb2 on Debian 9
 - 02 Icinga2 Modul Director on Debian9
 - 90_(Solved) Icinga error: icinga2: Can't send external Icinga command to the local command file "/var/run/icinga2/cmd/icinga2.cmd": Permission denied.
 - 99_(solved) error after enter token
 - add a client to Icinga / or Remove the client save
 - critical/icinga-app: Another instance of Icinga already running with PID
 - first Install check_nwc_health
 - Icinga config
 - Icinga2 | add a Windows Client to Icinga2 Master
 - Icinga2 | add Cisco Switch 3560 Familie
 - Icinga2 | add FreeNAS
 - Icinga2 | add Fritzbox 7490
 - Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)
 - Icinga2 | add Icinga2 Client to a Master (r2.9.0-1)
 - Icinga2 | add NAS-Drobo
 - Icinga2 | add OpnSense Check (check_opnsense)
 - Icinga2 | add Proxmox
 - Icinga2 | add Raspberry Pi (Debian9)
 - Icinga2 | add service to a hostgroup
 - Icinga2 | add Supermicro IPMI
 - Icinga2 | add USV/UPS
 - Icinga2 | check_logfiles
 - Icinga2 | ClamAV ¦ check_clamav
 - icinga2 | dashing test
 - Icinga2 | define (setup) the Master
 - Icinga2 | define Hostgroup & add Host to a Hostgroup
 - Icinga2 | dependencies
 - Icinga2 | Gude Expert Power Control 8220 Serie
 - Icinga2 | notification telegram & Email
 - Icinga2 | send email notification only once (on time)
 - Icinga2 | snmp
 - Icinga2 | SNMP Unifi Pro AP
 - Icinga2 | Upgrade Information
 - icinga2 |apt wrapper |-NOK 24.08.2018
 - icinga2 |check_log
 - icinga2 Problems
 - Muster
 - Path and Links to the documentation
 - plugin - Servie - Host
 - show Version & Check's & nice icinga2 commands
 - tmpl-24x7-host-mail
 
 Quellen/source:
- 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
-
-