diff --git a/bundles/icinga2/items.py b/bundles/icinga2/items.py index 3d734e0..0ee25f2 100644 --- a/bundles/icinga2/items.py +++ b/bundles/icinga2/items.py @@ -12,11 +12,11 @@ files = { }, '/etc/sshmon.priv': { 'content': repo.vault.decrypt_file(join('sshmon', 'sshmon.key.vault')), - #'owner': 'nagios', - #'group': 'nagios', + 'owner': 'nagios', + 'group': 'nagios', 'mode': '0400', - #'needs': { - # 'pkg_apt:icinga2-ido-pgsql', - #}, + 'needs': { + 'pkg_apt:icinga2-ido-pgsql', + }, } } diff --git a/bundles/icinga2/metadata.py b/bundles/icinga2/metadata.py index a3e6770..d51f927 100644 --- a/bundles/icinga2/metadata.py +++ b/bundles/icinga2/metadata.py @@ -9,6 +9,11 @@ defaults = { }, }, 'packages': { + 'icinga2': {}, + 'icinga2-ido-pgsql': {}, + 'icingaweb2': {}, + 'icingaweb2-module-monitoring': {}, + # needed for check_rbl 'libdata-validate-ip-perl': {}, 'libdata-validate-ip-perl': {}, diff --git a/data/nginx/files/extras/ovh.icinga2/icingaweb b/data/nginx/files/extras/ovh.icinga2/icingaweb new file mode 100644 index 0000000..2b0327d --- /dev/null +++ b/data/nginx/files/extras/ovh.icinga2/icingaweb @@ -0,0 +1,11 @@ + location ~ \.php$ { + include fastcgi.conf; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/run/php/php7.4-fpm.sock; + fastcgi_param SCRIPT_FILENAME /usr/share/icingaweb2/public/index.php; + fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2; + } + + location / { + try_files $1 $uri $uri/ /index.php$is_args$args; + } diff --git a/nodes/ovh/icinga2.py b/nodes/ovh/icinga2.py index c48a918..7ebdb2e 100644 --- a/nodes/ovh/icinga2.py +++ b/nodes/ovh/icinga2.py @@ -1,10 +1,13 @@ nodes['ovh.icinga2'] = { 'bundles': { 'icinga2', + 'php', 'postgresql', 'zfs', }, - 'groups': set(), + 'groups': { + 'webserver', + }, 'metadata': { 'interfaces': { 'eth0': { @@ -16,6 +19,25 @@ nodes['ovh.icinga2'] = { 'gateway6': '2001:41d0:701:1100::1' }, }, + 'nginx': { + 'vhosts': { + 'icingaweb': { + 'domain': 'icinga.kunsmann.eu', + 'webroot': '/usr/share/icingaweb2/public', + 'extras': True, + }, + }, + }, + 'php': { + 'version': '7.4', + 'packages': { + 'json', + 'opcache', + 'pgsql', + 'readline', + 'xml', + }, + }, 'zfs': { 'pools': { 'tank': {