Promethous+Alertmanager+Grafana 监控技术栈如下: Prometheus(最新版):基于TSDB的微服务指标采集&报警; Alertmanager:报警服务; Grafana(>=5.x):监控报表展示。

一、安装

1.Prometheus安装

1
2
3
4
5
6
7
8
# wget https://github.com/prometheus/prometheus/releases/download/v2.5.0/prometheus-2.5.0.linux-amd64.tar.gz
# tar zxvf prometheus-2.5.0.linux-amd64.tar.gz -C /usr/local/
# cd /usr/local/
# ln -s prometheus-2.5.0.linux-amd64 prometheus
# chown work:work prometheus* -R
# cd prometheus
# ls
# console_libraries consoles LICENSE NOTICE prometheus prometheus.yml promtool

2.Alertmanager安装

1
2
3
4
5
6
7
# wget https://github.com/prometheus/alertmanager/releases/download/v0.15.3/alertmanager-0.15.3.linux-amd64.tar.gz
# tar zxvf alertmanager-0.15.3.linux-amd64.tar.gz
# ln -s alertmanager-0.15.3.linux-amd64 alertmanager
# chown work:work alertmanager* -R
# cd alertmanager
# ls
# alertmanager alertmanager.yml amtool LICENSE NOTICE

3.Grafana安装

1
2
3
# wget wget https://dl.grafana.com/oss/release/grafana-5.3.4-1.x86_64.rpm 
# rpm -Uvh grafana-5.3.4-1.x86_64.rpm
# systemctl restart grafana.service