bundlewrap/bundles/vnstat/metadata.py
Franziska Kunsmann 26c2be07cf
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/vnstat: adjust vnstati calls for debian bullseye
2021-04-11 09:01:58 +02:00

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