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.查看指标信息是否有数据

至此,配置完成!

相关推荐
张文君6 小时前
ubuntu26.04从ext4改成mdadm的raid1+lvm启动
linux·运维·网络
DevHub7 小时前
QEMU + Busybox 搭建嵌入式 Linux 开发环境:内核编译到启动,30 秒一个迭代
linux·运维·服务器
ouynagda7 小时前
Linux 进程管理详解:从概念到实践
linux·运维·网络
2401_890603407 小时前
Linux 基础文件IO
linux·运维·服务器
tx11208763587 小时前
K8S-pod管理与控制器管理
linux·运维·kubernetes·pod
Awh-7 小时前
Linux软件应用编程 第一章中:Linux文件操作
linux·运维·服务器
adinnet20268 小时前
财务报销自动化:用智能体辅助处理繁琐报销任务
运维·自动化
zhendianluli9 小时前
VS Code Remote-SSH 连接故障排查手册(精详版)
运维·ssh
Tim风声(网络工程师)9 小时前
Kail下载
linux·运维·服务器