bundles/wireguard: add exclude_from_monitoring option for wireguard peers
This commit is contained in:
parent
69605acfc9
commit
56fce7d460
1 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,9 @@ def icinga2(metadata):
|
||||||
services = {}
|
services = {}
|
||||||
|
|
||||||
for peer, config in metadata.get('wireguard/peers', {}).items():
|
for peer, config in metadata.get('wireguard/peers', {}).items():
|
||||||
|
if config.get('exclude_from_monitoring', False):
|
||||||
|
continue
|
||||||
|
|
||||||
services[f'WIREGUARD CONNECTION {peer}'] = {
|
services[f'WIREGUARD CONNECTION {peer}'] = {
|
||||||
'command_on_monitored_host': config['pubkey'].format_into('sudo /usr/local/share/icinga/plugins/check_wireguard_connected wg0 {}'),
|
'command_on_monitored_host': config['pubkey'].format_into('sudo /usr/local/share/icinga/plugins/check_wireguard_connected wg0 {}'),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue