From 40160fb25afd25ee1e553fe506f809f6d1ac0818 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 2 May 2021 13:18:35 +0200 Subject: [PATCH] bundles: remove telegraf metrics from systemd-networkd and icinga2 --- bundles/icinga2/metadata.py | 21 --------------------- bundles/systemd-networkd/metadata.py | 27 --------------------------- 2 files changed, 48 deletions(-) diff --git a/bundles/icinga2/metadata.py b/bundles/icinga2/metadata.py index d9b26b2..48b441f 100644 --- a/bundles/icinga2/metadata.py +++ b/bundles/icinga2/metadata.py @@ -74,27 +74,6 @@ defaults = { }, } -if node.has_bundle('telegraf'): - defaults['icinga2']['api_users']['telegraf'] = { - 'password': repo.vault.password_for(f'{node.name} icinga2 api telegraf'), - 'permissions': { - 'objects/query/Service', - }, - } - - defaults['telegraf'] = { - 'input_plugins': { - 'builtin': { - 'icinga2': [{ - 'server': 'https://127.0.0.1:5665', - 'object_type': 'services', - 'username': 'telegraf', - 'password': repo.vault.password_for(f'{node.name} icinga2 api telegraf'), - 'insecure_skip_verify': True, - }], - }, - }, - } @metadata_reactor.provides( 'icinga2/icinga_users', diff --git a/bundles/systemd-networkd/metadata.py b/bundles/systemd-networkd/metadata.py index e87eb6a..e8dff0e 100644 --- a/bundles/systemd-networkd/metadata.py +++ b/bundles/systemd-networkd/metadata.py @@ -27,30 +27,3 @@ def add_vlan_infos_to_interface(metadata): return { 'interfaces': interfaces, } - - -@metadata_reactor.provides( - 'telegraf/input_plugins/builtin/bond', - 'telegraf/additional_capabilities', -) -def telegraf(metadata): - if not node.has_bundle('telegraf'): - raise DoNotRunAgain - - if metadata.get('systemd-networkd/bonds', {}): - return { - 'telegraf': { - 'input_plugins': { - 'builtin': { - 'bond': [{ - 'bond_interfaces': list(sorted(metadata.get('systemd-networkd/bonds').keys())), - }], - }, - }, - 'additional_capabilities': { - 'CAP_NET_ADMIN', - }, - }, - } - - return {}