mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-26 08:51:33 +02:00
Add relabel_config to replace endpoint address
This commit adds a relabeling config to the scrape config of windows-exporter using the 'replace' action field to replace the node endpoint address with node name. The windows_exporter returns endpoint target as node IP but we need it to be node name to use the prometheus adapter queries and collect resource metrics information.
This commit is contained in:
parent
7ba0479433
commit
1c63b6d021
@ -10,6 +10,17 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet';
|
||||
targets: [error 'must provide targets array'],
|
||||
},
|
||||
],
|
||||
relabel_configs: [
|
||||
{
|
||||
action: 'replace',
|
||||
regex: '(.*)',
|
||||
replacement: '$1',
|
||||
sourceLabels: [
|
||||
'__meta_kubernetes_endpoint_address_target_name',
|
||||
],
|
||||
targetLabel: 'instance',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
grafana+:: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user