bundles: add some telegraf plugins
This commit is contained in:
parent
5e0541aef8
commit
a37d31973a
12 changed files with 159 additions and 0 deletions
|
@ -27,3 +27,26 @@ def add_vlan_infos_to_interface(metadata):
|
|||
return {
|
||||
'interfaces': interfaces,
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'telegraf/input_plugins/builtin/bond',
|
||||
)
|
||||
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())),
|
||||
}],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue