Prometheus-Master
鉴于测试环境,Prometheus将与报警组件及Grafana组件安装在同一台Master节点
新建Prometheus持久化目录及文件
mkdir /etc/prometheus/{configs,rules} -p
vim /etc/prometheus/prometheus.ymlglobal:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets:
- 127.0.0.1:9093
rule_files:
- "rules/*.yml"
scrape_configs:
- job_name: '卡片联邦监控'
honor_labels: true
metrics_path: '/federate'
params:
'match[]':
- '{job="国内"}'
- '{job="海外"}'
static_configs:
- targets: ['IP:9090']
- targets: ['IP:9090']Docker运行Prometheus
Last updated
Was this helpful?