使用Prometheus监控etcd
安装
docker pull prom/prometheus
配置文件
my global config
global:
scrape_interval: 10s # By default, scrape targets every 15 seconds.
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
# - "first.rules"
# - "second.rules"
A scrape configuration containing exactly one endpoint to scrape:
Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label job=
to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 10s
scrape_timeout: 10s
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
# 这里配置要监控的所有etcd节点
target_groups:
- targets: ['10.2.122.70:5001','10.2.122.71:5001','10.2.122.72:5001']
运行
注意prometheus的web界面使用9090端口
docker run -p 5002:9090 -v /home/patterncat/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prometheus
访问
自动把集群的所有请求汇总了。
alertmanager
docker-hub-alertmanager
github-alertmanager
Prometheus 做為監控系統的優勢與限制
参考
etcd-metrics
prometheus
prometheus Using Docker
使用 Prometheus 监控 Docker 容器
Monitor etcd performance to ensure consistent Docker configuration
关键字:etcd
版权声明
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处。如若内容有涉嫌抄袭侵权/违法违规/事实不符,请点击 举报 进行投诉反馈!