Skip to content

Commit

Permalink
improvement: support relabelings in ServiceMonitor
Browse files Browse the repository at this point in the history
Signed-Off-By: Andreas Plesner <[email protected]>
  • Loading branch information
scoof committed Aug 12, 2024
1 parent 36b0aed commit 876b3f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/goldpinger/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ spec:
selector:
matchLabels:
{{- include "goldpinger.selectorLabels" . | nindent 6 }}
{{- with .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/goldpinger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 876b3f4

Please sign in to comment.