diff --git a/bundles/icinga2/files/icinga2/hosts.conf b/bundles/icinga2/files/icinga2/hosts.conf index 9e63392..fff4ec9 100644 --- a/bundles/icinga2/files/icinga2/hosts.conf +++ b/bundles/icinga2/files/icinga2/hosts.conf @@ -5,7 +5,7 @@ object Host "${monitored_node.name}" { vars.os = "Linux" vars.sla = "${monitored_node.metadata.get('sla', '24x7')}" vars.period = "${sla_info[monitored_node.metadata.get('sla', '24x7')]}" - address = "${monitored_node.hostname}" + address = "${monitored_node.metadata.get('icinga_options', {}).get('hostname', monitored_node.hostname)}" } % endfor diff --git a/nodes/home/router.py b/nodes/home/router.py index 72b36dd..e4894bf 100644 --- a/nodes/home/router.py +++ b/nodes/home/router.py @@ -41,6 +41,9 @@ nodes['home.router'] = { # day. 'restart_pppd': '23 2 * * * root systemctl restart pppoe', }, + 'icinga_options': { + 'hostname': 'franzi-home.kunbox.net', + }, 'iptables': { 'custom_rules': [ # This is a router. Allow forwarding traffic for all internal networks.