From 846d9d31a776f5509082e52f7ff08a5c7863aee6 Mon Sep 17 00:00:00 2001 From: YuryHrytsuk Date: Fri, 9 May 2025 15:31:15 +0200 Subject: [PATCH 1/3] Master: prometheus enable exemplers Related PR(s): * https://github.com/ITISFoundation/osparc-simcore/issues/7635 --- services/monitoring/docker-compose.master.yml.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/monitoring/docker-compose.master.yml.j2 b/services/monitoring/docker-compose.master.yml.j2 index 6896cfee..2a9720c0 100644 --- a/services/monitoring/docker-compose.master.yml.j2 +++ b/services/monitoring/docker-compose.master.yml.j2 @@ -6,6 +6,16 @@ services: constraints: - node.labels.grafana==true prometheuscatchall: + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--storage.tsdb.retention=${MONITORING_PROMETHEUS_RETENTION}" + - "--web.console.libraries=/usr/share/prometheus/console_libraries" + - "--web.console.templates=/usr/share/prometheus/consoles" + - "--web.external-url=https://${MONITORING_DOMAIN}/prometheus/" + - "--web.route-prefix=/" + - "--storage.tsdb.allow-overlapping-blocks" # via https://jessicagreben.medium.com/prometheus-fill-in-data-for-new-recording-rules-30a14ccb8467 + - "--enable-feature=exemplar-storage" deploy: placement: constraints: From b304468555c06f19b33fbe678273f0d24600fc6b Mon Sep 17 00:00:00 2001 From: YuryHrytsuk Date: Wed, 14 May 2025 15:13:54 +0200 Subject: [PATCH 2/3] Enable exemplars in all configurations --- services/monitoring/docker-compose.master.yml.j2 | 10 ---------- services/monitoring/docker-compose.yml.j2 | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/services/monitoring/docker-compose.master.yml.j2 b/services/monitoring/docker-compose.master.yml.j2 index 2a9720c0..6896cfee 100644 --- a/services/monitoring/docker-compose.master.yml.j2 +++ b/services/monitoring/docker-compose.master.yml.j2 @@ -6,16 +6,6 @@ services: constraints: - node.labels.grafana==true prometheuscatchall: - command: - - "--config.file=/etc/prometheus/prometheus.yml" - - "--storage.tsdb.path=/prometheus" - - "--storage.tsdb.retention=${MONITORING_PROMETHEUS_RETENTION}" - - "--web.console.libraries=/usr/share/prometheus/console_libraries" - - "--web.console.templates=/usr/share/prometheus/consoles" - - "--web.external-url=https://${MONITORING_DOMAIN}/prometheus/" - - "--web.route-prefix=/" - - "--storage.tsdb.allow-overlapping-blocks" # via https://jessicagreben.medium.com/prometheus-fill-in-data-for-new-recording-rules-30a14ccb8467 - - "--enable-feature=exemplar-storage" deploy: placement: constraints: diff --git a/services/monitoring/docker-compose.yml.j2 b/services/monitoring/docker-compose.yml.j2 index 11f823ba..e00d210a 100644 --- a/services/monitoring/docker-compose.yml.j2 +++ b/services/monitoring/docker-compose.yml.j2 @@ -44,6 +44,7 @@ services: - "--web.external-url=https://${MONITORING_DOMAIN}/prometheus/" - "--web.route-prefix=/" - "--storage.tsdb.allow-overlapping-blocks" # via https://jessicagreben.medium.com/prometheus-fill-in-data-for-new-recording-rules-30a14ccb8467 + - "--enable-feature=exemplar-storage" #- "--web.enable-admin-api" This allows messing with prometheus using its API from the CLI. Disabled for security reasons by default. networks: - monitored From 3d862101d199001ccda588ae521f3d32986c60c8 Mon Sep 17 00:00:00 2001 From: YuryHrytsuk Date: Tue, 20 May 2025 10:08:36 +0200 Subject: [PATCH 3/3] Configure tempo trace id for catchall data source Related PR(s): * https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/1405 --- services/monitoring/grafana/terraform/datasources.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/monitoring/grafana/terraform/datasources.tf b/services/monitoring/grafana/terraform/datasources.tf index 62a5ab38..f5012f1a 100644 --- a/services/monitoring/grafana/terraform/datasources.tf +++ b/services/monitoring/grafana/terraform/datasources.tf @@ -14,6 +14,16 @@ resource "grafana_data_source" "prometheuscatchall" { basic_auth_enabled = false is_default = false uid = "RmZEr52nz" + + json_data_encoded = jsonencode({ + exemplarTraceIdDestinations = [ + { + datasourceUid = "tempo" + name = "TraceID" + } + ] + }) + } resource "grafana_data_source" "tempo" {