# Prometheus Configuration for RocketMQ

global:
  scrape_interval: 15s
  evaluation_interval: 15s

alerting:
  alertmanagers:
    - static_configs:
        - targets: []

rule_files:
  - "rocketmq_rules.yml"

scrape_configs:
  # Prometheus自身
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

  # RocketMQ Exporter
  - job_name: 'rocketmq'
    static_configs:
      - targets: ['rocketmq-exporter:5557']
    metrics_path: /metrics
    scrape_interval: 10s

  # RocketMQ NameServer
  - job_name: 'rocketmq-namesrv'
    static_configs:
      - targets: ['namesrv-1:9876']
    metrics_path: /metrics
    scrape_interval: 30s

  # 自定义RocketMQ指标
  - job_name: 'rocketmq-broker'
    static_configs:
      - targets: ['broker-master-1:10911', 'broker-master-2:10911']
    metrics_path: /metrics
    scrape_interval: 10s
