#!/bin/bash # Install Incinga 2 wget -O - http://packages.icinga.com/icinga.key | apt-key add - apt update apt install -y icinga2 apt install -y monitoring-plugins ### # Setting up Icinga Web 2 ### apt install -y mysql-server mysql-client #mysql_secure_installation apt install -y icinga2-ido-mysql ### # Configuring DB IDO MySQL ### echo "[*] Configure DB IDO MySQL" mysql -u root -p <> /etc/postgresql/*/main/pg_hba.conf < /etc/icinga2/conf.d/api-users.conf <> /etc/php/7.0/apache2/php.ini service apache2 restart icingacli setup token create icingacli setup token show echo Go to http://$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')/icingaweb2/setup