prometheus监控es集群 — elasticsearch_exporter

本文介绍了如何利用elasticsearch_exporter来监控Elasticsearch集群。首先,下载并运行elasticsearch_exporter二进制包。接着,在Prometheus配置文件中配置新的job,指定elasticsearch_exporter的IP端口。然后,验证Prometheus成功抓取监控目标。最后,通过在Grafana中导入仪表盘ID 2322并选择prometheus数据源,可以查看完整的Elasticsearch集群监控指标。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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_
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值