diff --git a/examples/windows.jsonnet b/examples/windows.jsonnet index 0c9ff36f..d90fb8da 100644 --- a/examples/windows.jsonnet +++ b/examples/windows.jsonnet @@ -7,9 +7,9 @@ local kp = namespace: 'monitoring', }, windowsScrapeConfig+:: { - static_configs: { + static_configs: [{ targets: ['10.240.0.65:5000', '10.240.0.63:5000'], - }, + }], }, }, }; diff --git a/jsonnet/kube-prometheus/addons/windows.libsonnet b/jsonnet/kube-prometheus/addons/windows.libsonnet index cbf9071a..89920322 100644 --- a/jsonnet/kube-prometheus/addons/windows.libsonnet +++ b/jsonnet/kube-prometheus/addons/windows.libsonnet @@ -3,6 +3,7 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet'; { values+:: { + // This needs to follow prometheus naming convention and not prometheus-operator one windowsScrapeConfig+:: { job_name: 'windows-exporter', static_configs: [ @@ -15,10 +16,10 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet'; action: 'replace', regex: '(.*)', replacement: '$1', - sourceLabels: [ + source_labels: [ '__meta_kubernetes_endpoint_address_target_name', ], - targetLabel: 'instance', + target_label: 'instance', }, ], },