# Prometheus配置 - Seata监控
global:
  scrape_interval: 15s
  evaluation_interval: 15s
  external_labels:
    cluster: 'seata-cluster'
    monitor: 'seata-monitor'

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

rule_files: []

scrape_configs:
  # Seata Server metrics
  - job_name: 'seata-server'
    metrics_path: '/metrics/prometheus'
    static_configs:
      - targets: ['seata-server:7091']
        labels:
          application: 'seata-server'
          instance: 'seata-server-1'
      - targets: ['seata-server-cluster:7091']
        labels:
          application: 'seata-server'
          instance: 'seata-server-cluster-2'

  # Spring Boot Actuator metrics (for microservices)
  - job_name: 'spring-boot-actuator'
    metrics_path: '/actuator/prometheus'
    scrape_interval: 10s
    static_configs:
      - targets: ['order-service:8081', 'inventory-service:8082', 'finance-service:8083']
        labels:
          group: 'erp-microservices'

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