#!/bin/bash apt update apt upgrade apt -y install apt-transport-https wget gnupg wget -O - https://packages.icinga.com/icinga.key | apt-key add - DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ echo "deb https://packages.icinga.com/debian icinga-${DIST} main" > \ /etc/apt/sources.list.d/${DIST}-icinga.list echo "deb-src https://packages.icinga.com/debian icinga-${DIST} main" >> \ /etc/apt/sources.list.d/${DIST}-icinga.list apt update apt install icinga2 apt install monitoring-plugins apt install postgresql apt install icinga2-ido-pgsql icinga2 feature enable ido-pgsql systemctl restart icinga2 ## Change fqdn such that hostname -f returns a shortish FQDN. The default one from azure will not work. Too long for icinga??? icinga2 api setup cat >> /etc/icinga2/conf.d/api-users.conf <