diff --git a/charts/prometheus-snmp-exporter/Chart.yaml b/charts/prometheus-snmp-exporter/Chart.yaml index 6c7726df17b0..6db5cbea0d1f 100644 --- a/charts/prometheus-snmp-exporter/Chart.yaml +++ b/charts/prometheus-snmp-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Prometheus SNMP Exporter name: prometheus-snmp-exporter -version: 1.8.0 +version: 1.8.1 appVersion: v0.21.0 home: https://github.com/prometheus/snmp_exporter sources: diff --git a/charts/prometheus-snmp-exporter/templates/servicemonitor.yaml b/charts/prometheus-snmp-exporter/templates/servicemonitor.yaml index c2b3ae242742..25e8406b0c42 100644 --- a/charts/prometheus-snmp-exporter/templates/servicemonitor.yaml +++ b/charts/prometheus-snmp-exporter/templates/servicemonitor.yaml @@ -30,12 +30,15 @@ spec: - sourceLabels: [instance] targetLabel: instance replacement: {{ .target }} + action: replace - sourceLabels: [target] targetLabel: target replacement: {{ .name }} + action: replace {{- range $targetLabel, $replacement := .additionalMetricsRelabels | default $.Values.serviceMonitor.additionalMetricsRelabels }} - targetLabel: {{ $targetLabel }} replacement: {{ $replacement }} + action: replace {{- end }} {{- if (or .relabelings $.Values.serviceMonitor.relabelings) }} relabelings: