Franziska Kunsmann
54219928e4
All checks were successful
bundlewrap/pipeline/head This commit looks good
21 lines
544 B
Text
21 lines
544 B
Text
object UserGroup "on-call_sms" {
|
|
display_name = "On-Call Support"
|
|
}
|
|
|
|
% for username, config in sorted(node.metadata.get('icinga2', {}).get('icinga_users', {}).items()):
|
|
object User "${username}" {
|
|
display_name = "${username}"
|
|
enable_notifications = true
|
|
period = "24x7"
|
|
states = [ OK, Warning, Critical, Up, Down ]
|
|
types = [ Problem, Recovery ]
|
|
|
|
% if config['is_admin'] and (config['email'] or config['phone']):
|
|
groups = [ "on-call_sms" ]
|
|
% endif
|
|
|
|
email = "${config['email']}"
|
|
vars.mobile = "${config['phone']}"
|
|
}
|
|
|
|
% endfor
|