You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
636 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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 服务地址