From b33ddaadb558efbe1a0a6b5906c56587f0da3c53 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 10 Apr 2021 15:43:37 +0200 Subject: [PATCH] bundles/simple-icinga-dashboard: add replacements --- bundles/simple-icinga-dashboard/files/config.conf | 5 +++++ nodes/ovh/icinga2.py | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bundles/simple-icinga-dashboard/files/config.conf b/bundles/simple-icinga-dashboard/files/config.conf index 74e131e..bcf5b47 100644 --- a/bundles/simple-icinga-dashboard/files/config.conf +++ b/bundles/simple-icinga-dashboard/files/config.conf @@ -7,5 +7,10 @@ password = ${api_password} hosts = ${host_filter} services = ${service_filter} +[prettify] +% for search, replace in sorted(replacements.items()): +${search.lower()} = ${replace} +% endfor + [output] filename = /opt/simple-icinga-dashboard/out/index.html diff --git a/nodes/ovh/icinga2.py b/nodes/ovh/icinga2.py index f47f2bf..23e1aa9 100644 --- a/nodes/ovh/icinga2.py +++ b/nodes/ovh/icinga2.py @@ -110,7 +110,12 @@ nodes['ovh.icinga2'] = { 'api_user': 'dashboard', 'api_password': vault.password_for('ovh.icinga2 icinga2 api_user dashboard'), 'host_filter': '"checks_with_sms" in host.groups', - 'service_filter': '"checks_with_sms" in service.groups' + 'service_filter': '"checks_with_sms" in service.groups', + 'replacements': { + 'CONTENT': '', + 'NGINX': 'WEBSERVER', + 'PROCESS': 'SERVICE', + }, }, 'wireguard': { 'my_ip': '172.19.136.3/22',