From 3d872624eac7e77572c11ee3f601b57b6575899b Mon Sep 17 00:00:00 2001 From: gsmith-sas <65406958+gsmith-sas@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:00:00 -0500 Subject: [PATCH] Add elasticsearch-v2 Service Monitor def --- .../serviceMonitor-elasticsearch-v2.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 monitoring/monitors/logging/serviceMonitor-elasticsearch-v2.yaml diff --git a/monitoring/monitors/logging/serviceMonitor-elasticsearch-v2.yaml b/monitoring/monitors/logging/serviceMonitor-elasticsearch-v2.yaml new file mode 100644 index 00000000..e3a6d956 --- /dev/null +++ b/monitoring/monitors/logging/serviceMonitor-elasticsearch-v2.yaml @@ -0,0 +1,23 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: elasticsearch-v2 + labels: + sas.com/monitoring-base: kube-viya-monitoring +spec: + selector: + matchLabels: + app.kubernetes.io/name: prometheus-elasticsearch-exporter + namespaceSelector: + any: true + # Optional: change 'any' to 'false' above to limit namespace(s) + # matchNames: + # - logging + endpoints: + - port: http + path: /metrics + metricRelabelings: + # The Elasticsearch exporters inexplicably uses a 'node' label, which + # conflicts with the common Kubernetes 'node' label, so rename it + - sourceLabels: [node] + targetLabel: es_node