diff --git a/charts/goldpinger/templates/servicemonitor.yaml b/charts/goldpinger/templates/servicemonitor.yaml index 95bbad6..5d8af50 100644 --- a/charts/goldpinger/templates/servicemonitor.yaml +++ b/charts/goldpinger/templates/servicemonitor.yaml @@ -25,4 +25,8 @@ spec: selector: matchLabels: {{- include "goldpinger.selectorLabels" . | nindent 6 }} + {{- with .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 4 }} + {{- end }} {{- end -}} diff --git a/charts/goldpinger/values.yaml b/charts/goldpinger/values.yaml index b0cd8d2..ad3ba7f 100644 --- a/charts/goldpinger/values.yaml +++ b/charts/goldpinger/values.yaml @@ -143,6 +143,10 @@ serviceMonitor: # namespace: monitoring interval: 30s # honorLabels: true + metricRelabelings: {} + # - action: drop + # source_labels: [__name__] + # regex: goldpinger_peers_response_time_s_bucket ## Custom PrometheusRule to be defined ## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions