global:
  scrape_interval: 15s  # 抓取间隔
  evaluation_interval: 15s  # 告警规则检查间隔

alerting:
  alertmanagers:
    - static_configs:
        - targets: ["alertmanager:9093"]  # 如果使用 Alertmanager，需单独部署

rule_files:
  - "/etc/prometheus/alert_rules.yml"  # 告警规则文件路径

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

  - job_name: "node-exporter"  # 示例：监控服务器基础指标（需部署 Node Exporter）
    static_configs:
      - targets: ["node-exporter:9100"]  # Node Exporter 服务地址