From 04a23a28d20ecc0d989ba7bf2671a14cf4a0be94 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 20 Nov 2025 08:24:08 +0000 Subject: [PATCH] Update file vmagent.yaml.j2 --- roles/grafana/templates/vmagent.yaml.j2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/grafana/templates/vmagent.yaml.j2 b/roles/grafana/templates/vmagent.yaml.j2 index 377ca86..7c6d63f 100644 --- a/roles/grafana/templates/vmagent.yaml.j2 +++ b/roles/grafana/templates/vmagent.yaml.j2 @@ -50,14 +50,14 @@ scrape_configs: target_label: instance regex: '(.*):{{ monitoring_ports.proxmox_exporter }}' replacement: '${1}' + action: replace metric_relabel_configs: - # Исключаем остановленные контейнеры - - source_labels: [status] - regex: 'stopped' - action: drop - # Исключаем остановленные VM - - source_labels: [vm_status] - regex: 'stopped' + # Исключаем остановленные контейнеры (pve_up=0) + - source_labels: [__name__] + regex: 'pve_up' + action: keep + - source_labels: [pve_up] + regex: '0' action: drop # ========== Self-monitoring ==========