栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

prometheus监控es集群 — elasticsearch

prometheus监控es集群 — elasticsearch

1.下载elasticsearch_exporter的二进制包并解压、运行

下载二进制包并解压、运行:
$ wget https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v1.3.0/elasticsearch_exporter-1.3.0.linux-amd64.tar.gz
$ tar -xvf elasticsearch_exporter-1.3.0.linux-amd64.tar.gz
$ mv elasticsearch_exporter-1.3.0.linux-amd64/ elasticsearch_exporter
$ cd elasticsearch_exporter/

运行elasticsearch_exporter:
$ nohup ./elasticsearch_exporter --es.all --es.indices --es.cluster_settings --es.indices_settings --es.shards --es.snapshots --es.timeout=10s --web.listen-address=":9114" --web.telemetry-path="/metrics" --es.uri http://10.20.30.40:9200 &xelasticsearch_exporter

查看输出日志:
$ tailf nohup.out  

看指标信息:
$ curl "http://10.20.30.40:9114/metrics"   

2.在Prometheus配置文件中加入新的job_name,写elasticsearch_exporter暴露指标的ip端口:

添加job_name部分:
$ cat prometheus.yml                      
  - job_name: "elasticsearch_exporter"
    static_configs:
            - targets: ["10.20.30.40:9114"]

重启prometheus:
$ systemctl restart prometheus.service 

3.在 Prometheus Web 查看监控抓取目标,抓取成功:

4.grafana确认已添加prometheus数据源

 5. 在grafana Web 上导入仪表盘id为2322,选择prometheus数据源,在该仪表盘里可看到监控elasticsearch集群指标的完整信息。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/681076.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号