selectdb / doris-operator

Doris kubernetes operator
Apache License 2.0
66 stars 33 forks source link

helm doris charts是否增加一个ServiceMonitor配置文件和配置项? #130

Open anthony-yau opened 3 months ago

intelligentfu commented 3 months ago

监控部分我们已经整理出相关方案和 serviceMonitor 配置实例,现在在文档发版流程中。 至于helm 我们有这个打算,细节上我们比较谨慎还在详细讨论中,非常感谢你超前的提示。

catpineapple commented 2 months ago

ServiceMonitor itself is a CR provided by Prometheus Operator, which is used to tell Prometheus how to monitor the service (Service). It is part of the Prometheus Operator and is designed to simplify the process of configuring and managing monitoring targets in Kubernetes. ServiceMonitor is to Prometheus Operator what doris helm chart is to doris-operator. Therefore, ServiceMonitor should not be added to doris' helm chart. If you need to use ServiceMonitor, you can refer to our operation documentation (coming soon) to add it manually.

wdxxl commented 3 weeks ago

here is my example for service monitor be & fe. hope it works for you.

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    prometheus: k8s
  name: doriscluster-sample-be-monitor
  namespace: monitoring
spec:
  endpoints:
    - interval: 35s
      port: webserver-port # 8040
      path: /metrics
      params:
        format:
          - prometheus
      honorLabels: true
      relabelings:
        - sourceLabels: [ __address__ ]
          targetLabel: group
          replacement: "be"
  namespaceSelector:
    matchNames:
      - doris
  selector:
    matchLabels:
      app.doris.ownerreference/name: doriscluster-sample
      app.kubernetes.io/component: be
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    prometheus: k8s
  name: doriscluster-sample-fe-monitor
  namespace: monitoring
spec:
  endpoints:
    - interval: 35s
      port: http-port # 8030
      path: /metrics
      params:
        format:
          - prometheus
      honorLabels: true
      relabelings:
        - sourceLabels: [ __address__ ]
          targetLabel: group
          replacement: "fe"
  namespaceSelector:
    matchNames:
      - doris
  selector:
    matchLabels:
      app.doris.ownerreference/name: doriscluster-sample
      app.kubernetes.io/component: fe