diff --git a/data/common/common.yaml b/data/common/common.yaml --- a/data/common/common.yaml +++ b/data/common/common.yaml @@ -3164,6 +3164,7 @@ prometheus::server::listen_network: "%{lookup('internal_network')}" prometheus::server::listen_port: 9090 prometheus::server::certname: pergamon.softwareheritage.org +prometheus::server::fqdn: pergamon.internal.softwareheritage.org swh::deploy::environment: production diff --git a/site-modules/profile/manifests/icinga2/objects/agent_checks.pp b/site-modules/profile/manifests/icinga2/objects/agent_checks.pp --- a/site-modules/profile/manifests/icinga2/objects/agent_checks.pp +++ b/site-modules/profile/manifests/icinga2/objects/agent_checks.pp @@ -1,8 +1,9 @@ # Checks that need to be supported on icinga2 agents class profile::icinga2::objects::agent_checks { + $prometheus_host = lookup('prometheus::server::fqdn') $prometheus_port = lookup('prometheus::server::listen_port') - $prometheus_url = "pergamon.internal.softwareheritage.org:${prometheus_port}" + $prometheus_url = "http://${prometheus_host}:${prometheus_port}" $plugins = { 'check_journal' => {