prometheus监控es集群

插件下载地址:https://github.com/vvanholl/elasticsearch-prometheus-exporter

es版本:6.6.2  插件版本与es匹配为6.6.2

安装插件

./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/6.6.2.0/prometheus-exporter-6.6.2.0.zip

elasticsearch.yml添加配置

#如有有很多索引并且认为这个数据不重要的话
prometheus.indices: false
#集群设置
prometheus.cluster.settings: false

重启es集群

查看

http://<your-elasticsearch-host>:9200/_prometheus/metrics

prometheus.yml配置

- job_name: elasticsearch
  scrape_interval: 10s
  metrics_path: "/_prometheus/metrics"
  static_configs:
  - targets:
    - node1:9200
    - node2:9200
    - node3:9200
原文地址:https://www.cnblogs.com/fat-girl-spring/p/14434744.html