add option to exclude hosts from public status page

This commit is contained in:
Franzi 2023-05-21 06:59:34 +02:00
parent b35bfc85e9
commit 9fc0004746
Signed by: kunsi
GPG key ID: 12E3D2136B818350
10 changed files with 18 additions and 16 deletions

View file

@ -33,3 +33,11 @@ object ServiceGroup "checks_with_sms" {
assign where service.vars.notification.sms == true
ignore where host.vars.notification.sms == false
}
object ServiceGroup "statuspage" {
display_name = "Checks which are show on the public status page"
assign where service.vars.notification.sms == true
ignore where host.vars.notification.sms == false
ignore where host.vars.show_on_statuspage == false
}

View file

@ -14,7 +14,8 @@ object Host "${rnode.name}" {
vars.os = "${rnode.os}"
# used for status page
vars.pretty_name = "${rnode.metadata.get('icinga_options/pretty_name', rnode.name)}"
vars.pretty_name = "${rnode.metadata.get('icinga_options/pretty_name', rnode.metadata.get('hostname'))}"
vars.show_on_statuspage = ${str(rnode.metadata.get('icinga_options/show_on_statuspage', True)).lower()}
vars.period = "${rnode.metadata.get('icinga_options/period', '24x7')}"