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:
@@ -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+:: {
|
||||
|
||||
Reference in New Issue
Block a user