Skip to content

Commit

Permalink
Adding metricRelabelings and relabelings options (seglo#332)
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Glover <[email protected]>
  • Loading branch information
2 people authored and JohnPreston committed May 4, 2022
1 parent 2cfef16 commit c0f938b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/kafka-lag-exporter/templates/060-ServiceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ spec:
{{- if .Values.prometheus.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.prometheus.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- with .Values.prometheus.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- tpl (toYaml . | nindent 6) $ }}
{{- end }}
{{- with .Values.prometheus.serviceMonitor.relabelings }}
relabelings:
{{- tpl (toYaml . | nindent 6) $ }}
{{- end }}
{{- if .Values.prometheus.serviceMonitor.additionalConfig }}
{{ toYaml .Values.prometheus.serviceMonitor.additionalConfig | indent 2}}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/kafka-lag-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ prometheus:
serviceMonitor:
enabled: false
interval: "30s"
# metricRelabelings:
# - sourceLabels: [__name__]
# regex: ^(process_|jvm_).*$
# action: drop
# relabelings: []
# service monitor label selectors: https://github.com/helm/charts/blob/f5a751f174263971fafd21eee4e35416d6612a3d/stable/prometheus-operator/templates/prometheus/prometheus.yaml#L74
# additionalLabels:
# prometheus: k8s
Expand Down

0 comments on commit c0f938b

Please sign in to comment.