Franziska Kunsmann
26c2be07cf
All checks were successful
bundlewrap/pipeline/head This commit looks good
36 lines
735 B
Python
36 lines
735 B
Python
defaults = {
|
|
'apt': {
|
|
'packages': {
|
|
'vnstat': {},
|
|
'vnstati': {},
|
|
},
|
|
},
|
|
'icinga2_api': {
|
|
'vnstat': {
|
|
'services': {
|
|
'VNSTATD PROCESS': {
|
|
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C vnstatd -c 1:',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
'vnstat': {
|
|
'bandwidth': '1000',
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'vnstat/interface',
|
|
)
|
|
def get_default_interface(metadata):
|
|
interfaces = sorted(metadata.get('interfaces', {}).keys())
|
|
|
|
if interfaces:
|
|
return {
|
|
'vnstat': {
|
|
'interface': interfaces[0],
|
|
},
|
|
}
|
|
|
|
return {}
|