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

至此,配置完成!

相关推荐
東雪蓮☆4 小时前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs
qq_264220894 小时前
LVS负载均衡群集和LVS+Keepalived群集
运维·负载均衡·lvs
乌萨奇也要立志学C++4 小时前
【Linux】进程概念(二):进程查看与 fork 初探
linux·运维·服务器
雨落Liy4 小时前
Nginx 从入门到进阶:反向代理、负载均衡与高性能实战指南
运维·nginx·负载均衡
Yyyy4825 小时前
Nginx负载均衡集群实验步骤
运维·nginx·负载均衡
獭.獭.6 小时前
Linux -- 信号【上】
linux·运维·服务器
hashiqimiya6 小时前
centos配置环境变量jdk
linux·运维·centos
路由侠内网穿透7 小时前
本地部署 GPS 跟踪系统 Traccar 并实现外部访问
运维·服务器·网络·windows·tcp/ip
傻傻虎虎9 小时前
【Docker】常用帮忙、镜像、容器、其他命令合集(2)
运维·docker·容器
ZERO_pan10 小时前
服务器装机遇到的问题
运维·服务器