prometheus监控带安全认证的elasticsearch

1.下载elasticsearch_exporter

wget 下载二进制包并解压、运行:

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

2.运行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://elastic:FtBMPT31rPiQ@192.168.2.40:9200 &

(uri中要写成自己es的用户和密码)

查看输出日志:

3.看指标信息:

web 访问

4.启动好后来prometheus添加配置

编辑prometheus.yml

  • job_name: "es"

static_configs:

  • targets: ["192.168.2.40:9114"]

  • targets: ["192.168.2.41:9114"]

  • targets: ["192.168.2.42:9114"]

  1. 登录prometheus http://192.168.2.xx:9090/

6.配置完成后在Grafana官网中下载es的监控模板 Dashboards | Grafana Labs 下载es的模板

Elasticsearch Exporter Quickstart and Dashboard | Grafana Labs

7.添加Prometheus 数据源

8.选择 Prometheus

9.导入监控 Dashboard 模板

10.查看指标信息是否有数据

至此,配置完成!

相关推荐
Lovyk几秒前
Linux Shell 常用操作与脚本示例详解
linux·运维·服务器
iCan_qi37 分钟前
【Mac】【Minecraft】关于如何在Mac上搭建基岩版MC服务器的方法
运维·服务器·macos·minecraft
ezreal_pan3 小时前
Kubernetes 负载均衡现象解析:为何同一批次请求集中于单个 Pod
运维·云原生·k8s·traefik
朱皮皮呀3 小时前
Spring Cloud——服务注册与服务发现原理与实现
运维·spring cloud·eureka·服务发现·php
云边云科技4 小时前
零售行业新店网络零接触部署场景下,如何选择SDWAN
运维·服务器·网络·人工智能·安全·边缘计算·零售
城管不管5 小时前
Docker核心---数据卷(堵门秘籍)
运维·docker·容器
AOwhisky5 小时前
Linux 文本处理三剑客:awk、grep、sed 完全指南
linux·运维·服务器·网络·云计算·运维开发
xuanerya5 小时前
使用 SSH 方式克隆 GitHub 仓库没有权限解决办法
运维·ssh·github
Hello.Reader6 小时前
Elasticsearch Ruby 客户端安装与版本兼容指南
elasticsearch·jenkins·ruby
runfarther6 小时前
搭建LLaMA-Factory环境
linux·运维·服务器·python·自然语言处理·ai编程·llama-factory