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 ==========