diff --git a/bundles/icinga2/files/icinga2/groups.conf b/bundles/icinga2/files/icinga2/groups.conf index cc18159..513568c 100644 --- a/bundles/icinga2/files/icinga2/groups.conf +++ b/bundles/icinga2/files/icinga2/groups.conf @@ -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 +} diff --git a/bundles/icinga2/files/icinga2/hosts_template.conf b/bundles/icinga2/files/icinga2/hosts_template.conf index 1c4f957..631fc8a 100644 --- a/bundles/icinga2/files/icinga2/hosts_template.conf +++ b/bundles/icinga2/files/icinga2/hosts_template.conf @@ -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')}" diff --git a/groups/locations.py b/groups/locations.py index 94d7d8d..353832e 100644 --- a/groups/locations.py +++ b/groups/locations.py @@ -78,6 +78,7 @@ groups['home'] = { 'home.router', }, 'vars.notification.sms': False, + 'show_on_statuspage': False, }, 'postfix': { # It's fine to do this without authentificating to the relayhost. @@ -117,6 +118,9 @@ groups['voc'] = { 'day': 1, }, }, + 'icinga_options': { + 'show_on_statuspage': False, + }, 'location': 'voc', }, } diff --git a/nodes/entropia-jira.toml b/nodes/entropia-jira.toml index 84af119..d4bee28 100644 --- a/nodes/entropia-jira.toml +++ b/nodes/entropia-jira.toml @@ -3,7 +3,7 @@ dummy = true [metadata.icinga_options] period = "daytime" -pretty_name = "ticket.gulas.ch" +show_on_statuspage = false [metadata.icinga2_api.nginx.services."NGINX VHOST ticket-redirect CERTIFICATE"] check_command = "check_https_cert_at_url" diff --git a/nodes/htz-cloud/influxdb.py b/nodes/htz-cloud/influxdb.py index 7e780e5..59f729e 100644 --- a/nodes/htz-cloud/influxdb.py +++ b/nodes/htz-cloud/influxdb.py @@ -44,7 +44,8 @@ nodes['htz-cloud.influxdb'] = { 'login_max_duration': '30d', }, 'icinga_options': { - 'pretty_name': 'InfluxDB', + # no public access + 'show_on_statuspage': False, }, 'nginx': { 'vhosts': { diff --git a/nodes/ns-ghirahim.toml b/nodes/ns-ghirahim.toml index 28f61a8..ea835a0 100644 --- a/nodes/ns-ghirahim.toml +++ b/nodes/ns-ghirahim.toml @@ -12,9 +12,6 @@ ips = [ gateway4 = "46.101.80.1" gateway6 = "2a03:b0c0:1:d0::1" -[metadata.icinga_options] -pretty_name = "ns-ghirahim.kunbox.net" - [metadata.postfix] # It's fine to do this without authentificating to the relayhost. # These Systems are not supposed to send mail anywhere else diff --git a/nodes/ns-mephisto.toml b/nodes/ns-mephisto.toml index c707113..48ffd17 100644 --- a/nodes/ns-mephisto.toml +++ b/nodes/ns-mephisto.toml @@ -17,9 +17,6 @@ ips = [ gateway4 = "10.255.255.1" gateway6 = "fe80::250:56ff:fea8:628f" -[metadata.icinga_options] -pretty_name = "ns-mephisto.kunbox.net" - [metadata.nginx.vhosts.powerdnsadmin] domain = "ns-mephisto.kunbox.net" diff --git a/nodes/ovh/icinga2.py b/nodes/ovh/icinga2.py index 0e9e309..ea24874 100644 --- a/nodes/ovh/icinga2.py +++ b/nodes/ovh/icinga2.py @@ -127,7 +127,7 @@ nodes['ovh.icinga2'] = { 'password': vault.password_for('ovh.icinga2 icinga2 api_user dashboard'), }, 'filters': { - 'services': '"checks_with_sms" in service.groups', + 'services': '"statuspage" in service.groups', }, 'output': { 'page_title': 'franzi.business Service Status', diff --git a/nodes/voc/infobeamer-cms.py b/nodes/voc/infobeamer-cms.py index afc24e8..a4bb419 100644 --- a/nodes/voc/infobeamer-cms.py +++ b/nodes/voc/infobeamer-cms.py @@ -22,9 +22,6 @@ nodes['voc.infobeamer-cms'] = { 'gateway6': '2001:67c:20a0:e::1', }, }, - 'icinga_options': { - 'pretty_name': 'infobeamer-cms.c3voc.de', - }, 'infobeamer-cms': { 'domain': 'infobeamer-cms.c3voc.de', 'event_start_date': '2023-04-07', diff --git a/nodes/voc/pretalx.py b/nodes/voc/pretalx.py index fa3d116..86f2f68 100644 --- a/nodes/voc/pretalx.py +++ b/nodes/voc/pretalx.py @@ -35,9 +35,6 @@ nodes['voc.pretalx'] = { 'gateway6': '2a01:a700:48d1::1', }, }, - 'icinga_options': { - 'pretty_name': 'pretalx.c3voc.de', - }, 'nginx': { 'vhosts': { 'pretalx': {