Franziska Kunsmann
d428572461
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
21 lines
802 B
Text
21 lines
802 B
Text
% for node_data, icingaconf in sorted(bundle_metadata.items()):
|
|
% for service, config in sorted(icingaconf.items()):
|
|
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 isinstance(v, bool) or isinstance(v, int) or k in ["check_interval", "retry_interval"]:
|
|
${k} = ${str(v).lower()}
|
|
% elif isinstance(v, list):
|
|
${k} = [${", ".join(['"' + i + '"' for i in v])}]
|
|
% else:
|
|
${k} = "${v}"
|
|
% endif
|
|
% endif
|
|
% endfor
|
|
vars.bundle = "${bundle_name}"
|
|
vars.notification.sms = ${str(config.get('vars.notification.sms', False)).lower()}
|
|
}
|
|
% endfor
|
|
% endfor
|