bundles/icinga2: add default for vars.notification.mail, enable mail for check_sipgate_account_balance
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-22 11:44:09 +01:00
parent 9651d740ae
commit 3a56b0425c
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 3 additions and 1 deletions

View file

@ -4,7 +4,7 @@ object Service "${service}" {
import "generic-service"
host_name = "${node_data.name}"
% for k, v in sorted(config.items()):
% if k != 'import' and k != 'command_on_monitored_host':
% if k not in {'import', 'command_on_monitored_host'} and not k.startswith('vars.notification'):
% if isinstance(v, bool) or isinstance(v, int) or k in ["check_interval", "retry_interval"]:
${k} = ${str(v).lower()}
% elif isinstance(v, list):
@ -16,6 +16,7 @@ object Service "${service}" {
% endfor
vars.bundle = "${bundle_name}"
vars.notification.sms = ${str(config.get('vars.notification.sms', False)).lower()}
vars.notification.mail = ${str(config.get('vars.notification.mail', False)).lower()}
}
% endfor
% endfor

View file

@ -36,6 +36,7 @@ defaults = {
'SIPGATE ACCOUNT BALANCE': {
'check_command': 'check_sipgate_account_balance',
'check_interval': '30m',
'vars.notification.mail': True,
},
},
},