Technical note

Prometheus部署笔记

参考文档

node_exporter

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

只监控主节点:

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

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

Prometheus

vi prometheus.yml

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

vi prometheus.yml

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

启动:

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