bundles: remove telegraf metrics from systemd-networkd and icinga2

This commit is contained in:
Franzi 2021-05-02 13:18:35 +02:00
parent 3b1d1f7e94
commit 40160fb25a
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 0 additions and 48 deletions

View file

@ -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',

View file

@ -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 {}