From 321847ce4db408b87dfda016a4cfb339a40a68c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Tue, 5 May 2026 13:58:37 +0200 Subject: [PATCH 01/12] Change domain name of testlists servers in monitoring --- ansible/roles/prometheus/templates/prometheus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 1eacbaa0..b819452d 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,8 +388,8 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlists.dev.ooni.io:9102 - # - testlists.prod.ooni.io:9102 + - testlist-ec2.dev.ooni.io:9102 + - testlist-ec2.prod.ooni.io:9102 scrape_interval: 5s scheme: https relabel_configs: # Change the host to the proxy host with relabeling From 50d999deb378fb1a641f7ed2d77832de449460bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 11:31:58 +0200 Subject: [PATCH 02/12] Include - and digits in relabeling regex --- ansible/roles/prometheus/templates/prometheus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index b819452d..6e91a5b6 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -395,7 +395,7 @@ scrape_configs: relabel_configs: # Change the host to the proxy host with relabeling # Store ip in ecs_host - source_labels: [__address__] - regex: "([a-z\\.]+):([0-9]+)" # :" + regex: "([a-zA-Z0-9\\.-]+):([0-9]+)" # :" replacement: "$1" target_label: "ec2_host" action: "replace" @@ -407,7 +407,7 @@ scrape_configs: action: "replace" # Store the full adress with path in proxy_host - source_labels: [__address__] - regex: "([a-z\\.]+):([0-9]+)" # : + regex: "([a-zA-Z0-9\\.-]+):([0-9]+)" # : replacement: "{{monitoring_proxy_host}}:9200/${1}/${2}/metrics" # proxy.org:9200///metrics target_label: "__proxy_host" action: "replace" From c156a6ea57f191e2906c9d3ea5198c103a067ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 11:41:05 +0200 Subject: [PATCH 03/12] change metrics endpoint --- ansible/roles/prometheus/templates/prometheus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 6e91a5b6..089f166e 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,8 +388,8 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlist-ec2.dev.ooni.io:9102 - - testlist-ec2.prod.ooni.io:9102 + - testlist-ec2.dev.ooni.io:80 + - testlist-ec2.prod.ooni.io:80 scrape_interval: 5s scheme: https relabel_configs: # Change the host to the proxy host with relabeling From dcbb8f7f759dee62bdd751df065581c1cd291693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 11:44:12 +0200 Subject: [PATCH 04/12] change metrics endpoint port for testlists --- ansible/roles/prometheus/templates/prometheus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 089f166e..0271da48 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,8 +388,8 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlist-ec2.dev.ooni.io:80 - - testlist-ec2.prod.ooni.io:80 + - testlist-ec2.dev.ooni.io:443 + - testlist-ec2.prod.ooni.io:443 scrape_interval: 5s scheme: https relabel_configs: # Change the host to the proxy host with relabeling From 24437901b5906af0c8f880a3d3bfa4d65f80e1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 11:49:07 +0200 Subject: [PATCH 05/12] Change port and protocol for testlist server --- ansible/roles/prometheus/templates/prometheus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 0271da48..21579968 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,10 +388,10 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlist-ec2.dev.ooni.io:443 - - testlist-ec2.prod.ooni.io:443 + - testlist-ec2.dev.ooni.io:80 + - testlist-ec2.prod.ooni.io:80 scrape_interval: 5s - scheme: https + scheme: http relabel_configs: # Change the host to the proxy host with relabeling # Store ip in ecs_host - source_labels: [__address__] From 84f8dd3cedc473aeca303c0ed06c5cca7515361c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 15:43:40 +0200 Subject: [PATCH 06/12] simplify metrics collection for testlist servers --- .../roles/prometheus/templates/prometheus.yml | 42 +------------------ 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 21579968..e56b979d 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,48 +388,10 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlist-ec2.dev.ooni.io:80 - - testlist-ec2.prod.ooni.io:80 + - testlist-ec2.dev.ooni.io + - testlist-ec2.prod.ooni.io scrape_interval: 5s scheme: http - relabel_configs: # Change the host to the proxy host with relabeling - # Store ip in ecs_host - - source_labels: [__address__] - regex: "([a-zA-Z0-9\\.-]+):([0-9]+)" # :" - replacement: "$1" - target_label: "ec2_host" - action: "replace" - # Extract environment from address - - source_labels: [__address__] - regex: ".*(dev|prod).*" - replacement: "$1" - target_label: "env" - action: "replace" - # Store the full adress with path in proxy_host - - source_labels: [__address__] - regex: "([a-zA-Z0-9\\.-]+):([0-9]+)" # : - replacement: "{{monitoring_proxy_host}}:9200/${1}/${2}/metrics" # proxy.org:9200///metrics - target_label: "__proxy_host" - action: "replace" - # Change the environment part in proxy host - - source_labels: [__proxy_host, env] - separator: ";" - regex: "([^;]*)ENV([^;]*);(.*)" # __proxy_host;env - replacement: "$1$3$2" - target_label: "__proxy_host" - action: "replace" - # Change the address where to send the scrape request to - - source_labels: [__proxy_host] - regex: "([^/]*)/(.*)" - replacement: "$1" - target_label: "__address__" - action: "replace" - # Change the metrics path to include ip address and /metrics path - - source_labels: [__proxy_host] - regex: "([^/]*)/(.*)" - replacement: "/$2" - target_label: "__metrics_path__" - action: "replace" - job_name: "airflow" scheme: https From e12e65aba40df11755ad2ab490a9202d312c22da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 15:49:46 +0200 Subject: [PATCH 07/12] Add auth section to testlist job --- ansible/roles/prometheus/templates/prometheus.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index e56b979d..3aef555c 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -391,6 +391,9 @@ scrape_configs: - testlist-ec2.dev.ooni.io - testlist-ec2.prod.ooni.io scrape_interval: 5s + basic_auth: + username: 'prom' + password: '{{ prometheus_metrics_password }}' scheme: http - job_name: "airflow" From 54cbccfcdfdaacaa068732f5acc72a8e4ae02f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 15:53:58 +0200 Subject: [PATCH 08/12] Use https for the scrape job in testlists --- ansible/roles/prometheus/templates/prometheus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 3aef555c..5161d92f 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -394,7 +394,7 @@ scrape_configs: basic_auth: username: 'prom' password: '{{ prometheus_metrics_password }}' - scheme: http + scheme: https - job_name: "airflow" scheme: https From 63803aa5cff40a46c936b26eddb7174b605c73e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 15:57:03 +0200 Subject: [PATCH 09/12] Remove https from testlists service --- ansible/roles/prometheus/templates/prometheus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 5161d92f..3aef555c 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -394,7 +394,7 @@ scrape_configs: basic_auth: username: 'prom' password: '{{ prometheus_metrics_password }}' - scheme: https + scheme: http - job_name: "airflow" scheme: https From f87c2b1386bd4e56640ea06e838858187cc098ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 16:07:10 +0200 Subject: [PATCH 10/12] Use the right domain name for testlists --- ansible/roles/prometheus/templates/prometheus.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 3aef555c..0b6ca7ab 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,13 +388,10 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlist-ec2.dev.ooni.io - - testlist-ec2.prod.ooni.io + - testlists.prod.ooni.io + - testlists.dev.ooni.io scrape_interval: 5s - basic_auth: - username: 'prom' - password: '{{ prometheus_metrics_password }}' - scheme: http + scheme: https - job_name: "airflow" scheme: https From 91e341e45b795f51d6279a506dcbe5406fcfb4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 16:38:53 +0200 Subject: [PATCH 11/12] Use the correct metrics endpoint --- ansible/roles/prometheus/templates/prometheus.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index 0b6ca7ab..cd2d2bc7 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -388,10 +388,13 @@ scrape_configs: - job_name: "testlists" static_configs: - targets: - - testlists.prod.ooni.io - - testlists.dev.ooni.io + - testlist-ec2.prod.ooni.io + - testlist-ec2.dev.ooni.io scrape_interval: 5s scheme: https + basic_auth: + username: 'prom' + password: '{{ prometheus_metrics_password }}' - job_name: "airflow" scheme: https From 0d1d5dfb3e4d2682688ac3c5dcd2bf6fe11aab02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz?= Date: Wed, 6 May 2026 16:41:45 +0200 Subject: [PATCH 12/12] Remove https --- ansible/roles/prometheus/templates/prometheus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/prometheus/templates/prometheus.yml b/ansible/roles/prometheus/templates/prometheus.yml index cd2d2bc7..41e80eae 100755 --- a/ansible/roles/prometheus/templates/prometheus.yml +++ b/ansible/roles/prometheus/templates/prometheus.yml @@ -391,7 +391,7 @@ scrape_configs: - testlist-ec2.prod.ooni.io - testlist-ec2.dev.ooni.io scrape_interval: 5s - scheme: https + scheme: http basic_auth: username: 'prom' password: '{{ prometheus_metrics_password }}'