diff --git a/charts/kubezero-logging/templates/servicemonitor.yaml b/charts/kubezero-logging/templates/servicemonitor.yaml index 007acc88..0ca55952 100644 --- a/charts/kubezero-logging/templates/servicemonitor.yaml +++ b/charts/kubezero-logging/templates/servicemonitor.yaml @@ -19,6 +19,9 @@ spec: port: http path: /_prometheus/metrics selector: + matchExpressions: + key: elasticsearch.k8s.elastic.co/statefulset-name + operator: DoesNotExist matchLabels: common.k8s.elastic.co/type: elasticsearch elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }}