diff --git a/data/common/common.yaml b/data/common/common.yaml --- a/data/common/common.yaml +++ b/data/common/common.yaml @@ -3214,7 +3214,7 @@ swh::deploy::counters::sentry_dsn: "https://%{lookup('swh::deploy::counters::sentry_token')}@sentry.softwareheritage.org/19" swh::deploy::counters::user: "%{alias('swh::deploy::base_counters::user')}" swh::deploy::counters::group: "%{alias('swh::deploy::base_counters::group')}" -swh::deploy::counters::backend::listen::host: 127.0.0.1 +swh::deploy::counters::backend::listen::host: 0.0.0.0 swh::deploy::counters::backend::listen::port: "%{alias('swh::remote_service::counters::port')}" swh::deploy::counters::backend::workers: 2 swh::deploy::counters::backend::reload_mercy: 3600 diff --git a/site-modules/profile/manifests/swh/deploy/counters.pp b/site-modules/profile/manifests/swh/deploy/counters.pp --- a/site-modules/profile/manifests/swh/deploy/counters.pp +++ b/site-modules/profile/manifests/swh/deploy/counters.pp @@ -10,4 +10,12 @@ ::profile::swh::deploy::rpc_server {'counters': executable => 'swh.counters.api.server:make_app_from_configfile()', } + + profile::prometheus::export_scrape_config {"swh-counters_${::fqdn}": + job => 'swh-counters', + target => "${::fqdn}:${swh::remote_service::counters::port}", + scheme => 'http', + metrics_path => '/metrics', + } + }