From b909385ebb1e4aae8ef2bfb5902421406e5eb880 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 20 Nov 2025 08:40:47 +0000 Subject: [PATCH] Update file vmagent.yaml.j2 --- roles/grafana/templates/vmagent.yaml.j2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/grafana/templates/vmagent.yaml.j2 b/roles/grafana/templates/vmagent.yaml.j2 index 7c6d63f..1c0cf29 100644 --- a/roles/grafana/templates/vmagent.yaml.j2 +++ b/roles/grafana/templates/vmagent.yaml.j2 @@ -48,14 +48,16 @@ scrape_configs: relabel_configs: - source_labels: [__address__] target_label: instance - regex: '(.*):{{ monitoring_ports.proxmox_exporter }}' + regex: '([^:]+)(:\d+)?' + replacement: '${1}' + action: replace + - source_labels: [__address__] + target_label: __address__ + regex: '([^:]+)(:\d+)?' replacement: '${1}' action: replace metric_relabel_configs: # Исключаем остановленные контейнеры (pve_up=0) - - source_labels: [__name__] - regex: 'pve_up' - action: keep - source_labels: [pve_up] regex: '0' action: drop