BlueXIII's Blog

热爱技术,持续学习

0%

Prometheus部署笔记

参考文档

node_exporter

1
2
3
4
mkdir /sdecloud && cd /sdecloud
wget https://mazqmdpic.oss-cn-beijing.aliyuncs.com/node_exporter
chmod +x node_exporter
nohup ./node_exporter &

验证:
http://10.193.10.51:9100/metrics

elasticsearch_exporter

只监控主节点:

1
nohup ./elasticsearch_exporter --es.uri http://10.193.10.51:9200 &

验证:
http://10.193.10.51:9114/metrics

Prometheus

vi prometheus.yml

1
2
3
- job_name: 'ES集群'
static_configs:
- targets: ['10.193.10.51:9100','10.193.10.52:9100','10.193.10.53:9100']

vi prometheus.yml

1
2
3
- job_name: 'ES监控'
static_configs:
- targets: ['10.193.10.51:9114','10.193.10.52:9114','10.193.10.53:9114']

启动:

1
nohup /sdecloud/prometheus/prometheus   --web.enable-admin-api --web.enable-lifecycle --storage.tsdb.retention=190d &

验证:
http://10.193.21.4:9090

Grafana

http://10.133.0.131:3000/d/Od_cKCwnk/elasticsearch?orgId=1