diff --git a/site-modules/profile/manifests/icinga2/objects/static_checks.pp b/site-modules/profile/manifests/icinga2/objects/static_checks.pp index 9b0c1f4f839484592eb29dc23505c7de726eb241..9874aca269d1a70c516b65cc00bcfd1d9fbda018 100644 --- a/site-modules/profile/manifests/icinga2/objects/static_checks.pp +++ b/site-modules/profile/manifests/icinga2/objects/static_checks.pp @@ -25,11 +25,6 @@ class profile::icinga2::objects::static_checks { }, } - ::profile::swh::deploy::webapp::icinga_checks {'archive.softwareheritage.org': - environment => "production", - host_name => "moma.softwareheritage.org", - } - ::icinga2::object::host {'archive-production-rke2': check_command => 'dummy', address => 'k8s-archive-production-rke2.internal.softwareheritage.org', @@ -52,9 +47,14 @@ class profile::icinga2::objects::static_checks { }, } + ::profile::swh::deploy::webapp::icinga_checks {'archive.softwareheritage.org': + environment => "production", + host_name => "moma.softwareheritage.org", + } + ::profile::swh::deploy::webapp::icinga_checks {'webapp.staging.swh.network': - environment => "staging", - host_name => "archive-staging-rke2", + environment => "staging", + host_name => "archive-staging-rke2", } ::profile::swh::deploy::deposit::icinga_checks {'deposit.softwareheritage.org': @@ -63,17 +63,17 @@ class profile::icinga2::objects::static_checks { } ::profile::swh::deploy::deposit::icinga_checks {'deposit.staging.swh.network': - environment => "staging", - host_name => "archive-staging-rke2", + environment => "staging", + host_name => "archive-staging-rke2", } - ::profile::swh::deploy::vault::icinga_checks {'production': - storage => "http://storage-postgresql-ro.internal.softwareheritage.org", + ::profile::swh::deploy::vault::icinga_checks {'storage-postgresql-ro.internal.softwareheritage.org': + environment => "production", webapp => "https://archive.softwareheritage.org", } - ::profile::swh::deploy::vault::icinga_checks {'staging': - storage => "http://storage-ro.internal.staging.swh.network", + ::profile::swh::deploy::vault::icinga_checks {'storage-ro.internal.staging.swh.network': + environment => "staging", webapp => "https://webapp.staging.swh.network", } diff --git a/site-modules/profile/manifests/swh/deploy/deposit/icinga_checks.pp b/site-modules/profile/manifests/swh/deploy/deposit/icinga_checks.pp index 8705c52fcfc99d3b57debd17deafa31315eb5b54..4314979988ad8537bd9767fe12758e9a6e0b7804 100644 --- a/site-modules/profile/manifests/swh/deploy/deposit/icinga_checks.pp +++ b/site-modules/profile/manifests/swh/deploy/deposit/icinga_checks.pp @@ -2,12 +2,12 @@ define profile::swh::deploy::deposit::icinga_checks ( # vhost name of the service to check $vhost_name = $title, + $deposit_server = $title, $vhost_ssl_port = 443, $environment = undef, # The hostname where the services runs (icinga needs it) $host_name = undef, ) { - $backend_listen_host = lookup('swh::deploy::deposit::backend::listen::host') $backend_listen_port = lookup('swh::deploy::deposit::backend::listen::port') @@ -34,7 +34,7 @@ define profile::swh::deploy::deposit::icinga_checks ( # Install deposit end-to-end checks profile::icinga2::objects::e2e_checks_deposit {"End-to-end Deposit Test(s) in ${environment}": - deposit_server => lookup('swh::deploy::deposit::e2e::server'), + deposit_server => "https://${deposit_server}/1", deposit_user => lookup('swh::deploy::deposit::e2e::user'), deposit_pass => lookup('swh::deploy::deposit::e2e::password'), deposit_collection => lookup('swh::deploy::deposit::e2e::collection'), diff --git a/site-modules/profile/manifests/swh/deploy/vault/icinga_checks.pp b/site-modules/profile/manifests/swh/deploy/vault/icinga_checks.pp index 6d870b5d43a3ba0d3c984e4640081b6e1e8aa55c..974e97561a83f40f6770362f09da411e11d814e6 100644 --- a/site-modules/profile/manifests/swh/deploy/vault/icinga_checks.pp +++ b/site-modules/profile/manifests/swh/deploy/vault/icinga_checks.pp @@ -1,13 +1,12 @@ # Install icinga checks for one webapp instance define profile::swh::deploy::vault::icinga_checks ( - $environment = $title, - $storage = undef, + $storage = $title, $webapp = undef, -) -{ + $environment = undef, +) { # Install vault end-to-end checks profile::icinga2::objects::e2e_checks_vault {"End-to-end Vault Test(s) in ${environment}": - server_vault => $storage, + server_vault => "http://${storage}", server_webapp => $webapp, environment => $environment, } diff --git a/site-modules/profile/manifests/swh/deploy/webapp/icinga_checks.pp b/site-modules/profile/manifests/swh/deploy/webapp/icinga_checks.pp index 31db294b45c86c49dde817f27a54701f1d2cdb71..7532ecce891b119b26e858a41d7de70af6a8f5ed 100644 --- a/site-modules/profile/manifests/swh/deploy/webapp/icinga_checks.pp +++ b/site-modules/profile/manifests/swh/deploy/webapp/icinga_checks.pp @@ -2,6 +2,7 @@ define profile::swh::deploy::webapp::icinga_checks ( # vhost name of the service to check $vhost_name = $title, + $server_webapp = $title, $vhost_ssl_port = 443, $environment = undef, # The hostname where the services runs (icinga needs it) @@ -71,7 +72,7 @@ define profile::swh::deploy::webapp::icinga_checks ( $origins = lookup('swh::deploy::savecodenow::e2e::origins') each($origins) | $entry | { profile::icinga2::objects::e2e_checks_savecodenow {"End-to-end SaveCodeNow Check - ${entry['name']} with type ${entry['type']} in ${environment}": - server_webapp => lookup('swh::deploy::savecodenow::e2e::webapp'), + server_webapp => "https://${server_webapp}", origin_name => $entry['name'], origin_url => $entry['origin'], origin_type => $entry['type'],