bundles/icinga2: support specifying an alternative host for checks
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-21 10:58:57 +01:00
parent daa90a4668
commit 63fd31c226
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 4 additions and 1 deletions

View file

@ -5,7 +5,7 @@ object Host "${monitored_node.name}" {
vars.os = "Linux"
vars.sla = "${monitored_node.metadata.get('sla', '24x7')}"
vars.period = "${sla_info[monitored_node.metadata.get('sla', '24x7')]}"
address = "${monitored_node.hostname}"
address = "${monitored_node.metadata.get('icinga_options', {}).get('hostname', monitored_node.hostname)}"
}
% endfor

View file

@ -41,6 +41,9 @@ nodes['home.router'] = {
# day.
'restart_pppd': '23 2 * * * root systemctl restart pppoe',
},
'icinga_options': {
'hostname': 'franzi-home.kunbox.net',
},
'iptables': {
'custom_rules': [
# This is a router. Allow forwarding traffic for all internal networks.