diff --git a/charts/prometheus-snmp-exporter/Chart.yaml b/charts/prometheus-snmp-exporter/Chart.yaml index 9258438492a9..6c351c5a878c 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: 5.2.0 +version: 5.3.0 appVersion: v0.25.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 9ac3218e5fc4..7731368b1428 100644 --- a/charts/prometheus-snmp-exporter/templates/servicemonitor.yaml +++ b/charts/prometheus-snmp-exporter/templates/servicemonitor.yaml @@ -39,6 +39,9 @@ spec: replacement: {{ $replacement }} action: replace {{- end }} + {{- if (or .additionalMetricsRelabelConfigs $.Values.serviceMonitor.additionalMetricsRelabelConfigs) }} + {{- toYaml (default $.Values.serviceMonitor.additionalMetricsRelabelConfigs .additionalMetricsRelabelConfigs) | nindent 6 }} + {{- end }} {{- if (or .relabelings $.Values.serviceMonitor.relabelings) }} relabelings: {{- toYaml (default $.Values.serviceMonitor.relabelings .relabelings) | nindent 6 }} diff --git a/charts/prometheus-snmp-exporter/values.yaml b/charts/prometheus-snmp-exporter/values.yaml index f1b244432b52..a15074b44cb6 100644 --- a/charts/prometheus-snmp-exporter/values.yaml +++ b/charts/prometheus-snmp-exporter/values.yaml @@ -185,7 +185,21 @@ serviceMonitor: # Metric relabeling is applied to samples as the last step before ingestion. # Set if defined unless overriden by params.additionalMetricsRelabels. + # This sets fixed relabel configs with action 'replace'. additionalMetricsRelabels: {} + # targetLabel1: replacementValue1 + # targetLabel2: replacementValue2 + + # Metric relabeling is applied to samples as the last step before ingestion. + # Set if defined unless overridden by params.additionalMetricsRelabelConfigs. + # This allows setting arbitrary relabel configs. + # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig + additionalMetricsRelabelConfigs: [] + # - sourceLabels: [__name__] + # targetLabel: __name__ + # action: replace + # regex: (.*) + # replacement: prefix_$1 # Label for selecting service monitors as set in Prometheus CRD. # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.PrometheusSpec @@ -214,7 +228,10 @@ serviceMonitor: # Relabelings. Overrides value set in serviceMonitor.relabelings # relabelings: [] # Map of metric labels and values to add. Overrides value set in serviceMonitor.additionalMetricsRelabels + # This sets fixed relabel configs with action 'replace'. # additionalMetricsRelabels: {} + # Metrics relabelings. Overrides value set in serviceMonitor.additionalMetricsRelabelConfigs + # additionalMetricsRelabelConfigs: [] # Extra manifests to deploy as an array extraManifests: []