bundles/wireguard: remove wg_health_check
This commit is contained in:
parent
f3269ce979
commit
86b8cd8edf
2 changed files with 0 additions and 45 deletions
|
@ -306,40 +306,3 @@ def snat(metadata):
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'wireguard/health_checks',
|
||||
'systemd-timers/timers/wg-health-check',
|
||||
)
|
||||
def health_checks(metadata):
|
||||
checks = {}
|
||||
|
||||
for peer, config in metadata.get('wireguard/peers', {}).items():
|
||||
if (
|
||||
config.get('exclude_from_monitoring', False)
|
||||
or not config.get('auto_connection', True)
|
||||
or 'endpoint' not in config
|
||||
):
|
||||
continue
|
||||
|
||||
checks[peer] = config['their_ip']
|
||||
|
||||
if checks:
|
||||
timer = {
|
||||
'wg-health-check': {
|
||||
'command': '/usr/local/bin/wg_health_check',
|
||||
'when': 'minutely',
|
||||
},
|
||||
}
|
||||
else:
|
||||
timer = {}
|
||||
|
||||
return {
|
||||
'systemd-timers': {
|
||||
'timers': timer,
|
||||
},
|
||||
'wireguard': {
|
||||
'health_checks': checks,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue