prometheus配置文件踩坑记

记prometheus配置文件踩坑。

global:
  scrape_interval:     15s
  evaluation_interval: 15s
  external_labels:
      monitor: 'exporter-metrics'
#告警manager配置
alerting:
  alertmanagers:
   # 需配置scheme,不然会报解析错误
  - scheme: http
    dns_sd_configs:
    - names:
      - alertmanager
      refresh_interval: 15s
      type: A
      port: 9093
# 配置告警规则配置文件路径
rule_files:
    - /etc/prom-conf/prometheus.rules.yml

scrape_configs:
- job_name: 'HostsMetrics'
  dns_sd_configs:
  - names:
    - node-exporter
    refresh_interval: 15s
    type: A
    port: 9100

你可能感兴趣的:(prometheus配置文件踩坑记)