Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/swh/deploy/counters.pp
# Deployment of the swh.counters.api server | # Deployment of the swh.counters.api server | ||||
class profile::swh::deploy::counters { | class profile::swh::deploy::counters { | ||||
include ::profile::swh::deploy::base_counters | include ::profile::swh::deploy::base_counters | ||||
$service_port = lookup('swh::remote_service::counters::port') | |||||
class { '::redis': | class { '::redis': | ||||
bind => '127.0.0.1', | bind => '127.0.0.1', | ||||
save_db_to_disk_interval => { '30' => '1' }, | save_db_to_disk_interval => { '30' => '1' }, | ||||
} | } | ||||
::profile::swh::deploy::rpc_server {'counters': | ::profile::swh::deploy::rpc_server {'counters': | ||||
executable => 'swh.counters.api.server:make_app_from_configfile()', | executable => 'swh.counters.api.server:make_app_from_configfile()', | ||||
} | } | ||||
profile::prometheus::export_scrape_config {"swh-counters_${::fqdn}": | profile::prometheus::export_scrape_config {"swh-counters_${::fqdn}": | ||||
job => 'swh-counters', | job => 'swh-counters', | ||||
target => "${::fqdn}:${swh::remote_service::counters::port}", | target => "${::fqdn}:${service_port}", | ||||
scheme => 'http', | scheme => 'http', | ||||
metrics_path => '/metrics', | metrics_path => '/metrics', | ||||
} | } | ||||
} | } |