From a2af07d1dc0516731a365adc25f40f9cf4ea6653 Mon Sep 17 00:00:00 2001 From: klinch0 <68821526+klinch0@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:58:16 +0300 Subject: [PATCH] bugfix/fix-longterm (#697) ## Summary by CodeRabbit - **New Features** - Updated the remote write configuration to support multiple endpoints, allowing data ingestion from both short-term and long-term services for improved flexibility. Signed-off-by: kklinch0 --- packages/system/monitoring-agents/templates/vmagent.yaml | 5 ++++- packages/system/monitoring-agents/values.yaml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/system/monitoring-agents/templates/vmagent.yaml b/packages/system/monitoring-agents/templates/vmagent.yaml index 65b93983..bf53965b 100644 --- a/packages/system/monitoring-agents/templates/vmagent.yaml +++ b/packages/system/monitoring-agents/templates/vmagent.yaml @@ -10,7 +10,10 @@ spec: promscrape.streamParse: "true" promscrape.maxScrapeSize: 32MB remoteWrite: - - url: {{ .Values.vmagent.remoteWrite.url | quote }} + {{- range .Values.vmagent.remoteWrite.urls }} + - url: {{ . | quote }} + {{- end }} + scrapeInterval: 30s selectAllByDefault: true additionalScrapeConfigs: diff --git a/packages/system/monitoring-agents/values.yaml b/packages/system/monitoring-agents/values.yaml index 4f1694e3..a6798a78 100644 --- a/packages/system/monitoring-agents/values.yaml +++ b/packages/system/monitoring-agents/values.yaml @@ -306,7 +306,9 @@ vmagent: cluster: cozystack tenant: tenant-root remoteWrite: - url: http://vminsert-shortterm.tenant-root.svc:8480/insert/0/prometheus + urls: + - http://vminsert-shortterm.tenant-root.svc:8480/insert/0/prometheus + - http://vminsert-longterm.tenant-root.svc:8480/insert/0/prometheus fluent-bit: readinessProbe: