bundles/transmission: add telegraf statistics
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
This commit is contained in:
parent
3b3bdeecab
commit
df192e543b
4 changed files with 65 additions and 2 deletions
|
@ -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'] = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue