Skip to content
Snippets Groups Projects
Verified Commit 993fc56d authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Deactivate scrape metrics on the static prometheus

So it's done within the dynamic infra cluster. That way, we'll be able to design
alertmanager alerts.

Refs. swh/infra/sysadm-environment#5213
parent bf01b0d6
No related branches found
No related tags found
1 merge request!692Deactivate scrape metrics on the static prometheus
......@@ -2,3 +2,6 @@ backups::exclude:
- var/lib/rabbitmq
swh::deploy::scheduler::remote::backend::listen::host: 0.0.0.0
# No metrics scraped by pergamon, it's done within the dynamic infra cluster
prometheus::rabbitmq::scrape_metrics: false
......@@ -12,3 +12,6 @@ swh::postgres::service::users:
swh::deploy::scheduler::remote::backend::listen::host: 0.0.0.0
swh::deploy::scheduler::task_broker: "amqp://guest:guest@127.0.0.1:5672/%2f"
# No metrics scraped by pergamon, it's done within the dynamic infra cluster
prometheus::rabbitmq::scrape_metrics: false
......@@ -54,6 +54,8 @@ class profile::rabbitmq {
$prometheus_rabbit_timeout = lookup('prometheus::rabbitmq::rabbit_timeout', Integer)
$prometheus_exclude_metrics = lookup('prometheus::rabbitmq::exclude_metrics', Array[String]).join(',')
# scrape metrics by default, but be able to deactivate it
$prometheus_rabbit_scrape_metrics = lookup('prometheus::rabbitmq::scrape_metrics', { default_value => true })
if versioncmp($::lsbmajdistrelease, '11') >= 0 {
# Install the official plugin along rabbitmq
......@@ -76,10 +78,12 @@ class profile::rabbitmq {
}
}
profile::prometheus::export_scrape_config {'rabbitmq':
target => $prometheus_target,
scrape_interval => '15s',
scrape_timeout => '10s',
if $prometheus_rabbit_scrape_metrics {
profile::prometheus::export_scrape_config {'rabbitmq':
target => $prometheus_target,
scrape_interval => '15s',
scrape_timeout => '10s',
}
}
# monitoring user for the icinga check
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment