• 告警通知
  • WhizardTelemetry 告警扩展的--tsdb.retention

操作系统信息
虚拟机,Ubuntu24.04,4C/16G

Kubernetes版本信息
# kubectl version

Client Version: v1.31.0

Kustomize Version: v5.4.2

Server Version: v1.31.0

容器运行时
# crictl version

Version: 0.1.0

RuntimeName: containerd

RuntimeVersion: 1.7.12

RuntimeApiVersion: v1

KubeSphere版本信息
例如:v4.1.2,在线安装,在已有K8s上安装。

问题是:安装WhizardTelemetry 告警扩展后thanos-ruler报错thanos: error: expected argument for flag '--tsdb.retention',请问--tsdb.retention的值是在哪里设置?

containers:
    - name: thanos-ruler
      image: 'swr.cn-southwest-2.myhuaweicloud.com/ks/thanosio/thanos:v0.36.1'
      args:
        - rule
        - '--data-dir=/thanos/data'
        - '--eval-interval=1m'
        - '--tsdb.retention'
        - '--label=thanos_ruler_replica="$(POD_NAME)"'
        - '--label=cluster="host"'
        - '--alert.label-drop=thanos_ruler_replica'
        - '--log.format=logfmt'
        - '--rule-file=/etc/thanos/rules/*/*.yaml'
        - >-
          --query=http://prometheus-operated.kubesphere-monitoring-system.svc:9090
        - '--http.config=/etc/thanos/web_config/web-config.yaml'
  • lnnt 回复了此帖

    xulai
    参考此贴解决了,谢谢

    kubectl get crd thanosrulers.monitoring.coreos.com -o yaml | grep reten -A 5
    
    kubectl edit crd thanosrulers.monitoring.coreos.com