apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-config
  namespace: clickvisual
data:
  prometheus.yaml: |
    global:
      evaluation_interval: "15s"
    rule_files:
      - /etc/prometheus/rules/*.yaml
    # 配置采集目标
    scrape_configs:
    - job_name: prometheus
      static_configs:
      - targets:
        # 采集自身
        - localhost:9090
    alerting:
      # 告警配置文件
      alertmanagers:
      # 修改：使用静态绑定
      - static_configs:
        # 修改：targets、指定地址与端口
        - targets: ["alertmanager:9093"]
    remote_read:
      - url: "http://prom2click:9201/read"
        read_recent: true
    remote_write:
      - url: "http://prom2click:9201/write"
        queue_config:
          capacity: 10000
          max_shards: 1
          max_samples_per_send: 500
