Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-snmp-exporter] Extend metric relabels #4490

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-snmp-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
17 changes: 17 additions & 0 deletions charts/prometheus-snmp-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
ngc4579 marked this conversation as resolved.
Show resolved Hide resolved
# 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
Expand Down Expand Up @@ -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
ngc4579 marked this conversation as resolved.
Show resolved Hide resolved
# 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: []
Expand Down