From 3c0960766cd8f8c87ae1c11267e526267a4d2205 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Tue, 16 Aug 2022 22:39:42 +0200 Subject: [PATCH] wip --- bundles/icinga2/files/constants.conf | 2 +- bundles/icinga2/files/zones.conf | 9 +-------- bundles/icinga2/items.py | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/bundles/icinga2/files/constants.conf b/bundles/icinga2/files/constants.conf index 11159a4..007c0d1 100644 --- a/bundles/icinga2/files/constants.conf +++ b/bundles/icinga2/files/constants.conf @@ -2,5 +2,5 @@ const PluginDir = "/usr/lib/nagios/plugins" const ManubulonPluginDir = "/usr/lib/nagios/plugins" const PluginContribDir = "/usr/lib/nagios/plugins" const NodeName = "${hostname}" -const ZoneName = "${hostname}" +const ZoneName = NodeName const TicketSalt = "" diff --git a/bundles/icinga2/files/zones.conf b/bundles/icinga2/files/zones.conf index f3abbb0..59b1fdb 100644 --- a/bundles/icinga2/files/zones.conf +++ b/bundles/icinga2/files/zones.conf @@ -3,12 +3,5 @@ object Endpoint NodeName { } object Zone ZoneName { - endpoints = [ NodeName, "server.home.ckn.li" ] -} - - - -# WHY????? -object Endpoint "server.home.ckn.li" { - host = NodeName + endpoints = [ NodeName ] } diff --git a/bundles/icinga2/items.py b/bundles/icinga2/items.py index d6a6f22..d57b747 100644 --- a/bundles/icinga2/items.py +++ b/bundles/icinga2/items.py @@ -62,7 +62,7 @@ files = { 'group': 'nagios', 'mode': '0640', 'context': { - 'hostname': node.metadata.get('icinga2/hostname') + 'hostname': node.metadata.get('hostname') }, 'triggers': [ 'svc_systemd:icinga2.service:restart',