bundles/transmission: add telegraf statistics
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit

This commit is contained in:
Franzi 2021-05-19 20:12:52 +02:00
parent 3b3bdeecab
commit df192e543b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 65 additions and 2 deletions

View file

@ -59,13 +59,13 @@ telegraf_config = {
# is a dict, of which we only use the value of it. This also allows us
# to overwrite values set by metadata defaults/reactors in node and group
# metadata, if needed.
for config in node.metadata.get('telegraf/input_plugins/exec', {}).values():
for config in sorted(node.metadata.get('telegraf/input_plugins/exec', {}).values(), key=lambda c: ''.join(c['commands'])):
if 'exec' not in telegraf_config['inputs']:
telegraf_config['inputs']['exec'] = []
telegraf_config['inputs']['exec'].append(config)
for config in node.metadata.get('telegraf/input_plugins/execd', {}).values():
for config in sorted(node.metadata.get('telegraf/input_plugins/execd', {}).values(), key=lambda c: ''.join(c['commands'])):
if 'execd' not in telegraf_config['inputs']:
telegraf_config['inputs']['execd'] = []