Skip to content

Commit

Permalink
[prometheus-node-exporter] add targetLabels support in servicemonitor (
Browse files Browse the repository at this point in the history
…prometheus-community#4970)

Signed-off-by: kranthikirang <[email protected]>
  • Loading branch information
kranthikirang committed Nov 5, 2024
1 parent 6426a96 commit 3c0be5d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-node-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- prometheus
- exporter
type: application
version: 4.41.0
version: 4.42.0
appVersion: 1.8.2
home: https://github.com/prometheus/node_exporter/
sources:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-node-exporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
podTargetLabels:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.prometheus.monitor.targetLabels }}
targetLabels:
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- with .Values.prometheus.monitor.selectorOverride }}
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ prometheus:
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitor
podTargetLabels: []

# List of target labels to add to node exporter metrics
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitor
targetLabels: []

scheme: http
basicAuth: {}
bearerTokenFile:
Expand Down

0 comments on commit 3c0be5d

Please sign in to comment.