prometheus监控elasticsearch

本文档介绍了如何在Docker环境下部署Elasticsearch 6.7.1并安装Prometheus exporter插件,然后配置Prometheus以监控Elasticsearch,并在Grafana中导入模板进行可视化展示。详细步骤包括下载插件、安装、配置Prometheus和Grafana监控模板。

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

1.elasticsearch 

版本:docker 部署的 6.7.1

根据不同的版本到 https://github.com/vvanholl/elasticsearch-prometheus-exporter/tags 找到对应版本的插件地址。

进入docker 执行,此处为6.7.1版本

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

安装成功显示

-> Downloading https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/6.7.1.0/prometheus-exporter-6.7.1.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessClassInPackage.sun.misc
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.reflect.ReflectPermission suppressAccessChecks
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed prometheus-exporter

2.promethues

配置prometheus.yml 

targets:  你的es机器主机地址

scrape_configs:
  - job_name: 'elasticsearch'
    metrics_path: "/_prometheus/metrics"
    static_configs:
    - targets: [ '172.16.15.54:9200']
    - targets: [ '172.16.15.188:9200']
    - targets: [ '172.16.15.122:9203']

重启prometheus 生效,并进入prometheus 查看 status-Service Discovery ,如图

3.grafana

配置监控模版,import导入266模版

4.监控实图

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值