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

至此,配置完成!

相关推荐
北邮刘老师31 分钟前
A3C Network:智能体互联网的层次化视图
运维·服务器·网络
空中楼阁,梦幻泡影1 小时前
LoRA 详细解析,使用LoRA 方式对模型进行微调详细操作指南
运维·服务器·人工智能·机器学习·语言模型
晚风吹长发1 小时前
初步了解Linux中的动静态库及其制作和使用
linux·运维·服务器·数据结构·c++·后端·算法
Le_ee1 小时前
dc4打靶报告
运维·服务器·网络
yeflx2 小时前
解决Ubuntu22.04宿主机docker容器中nvidia-smi偶发失效问题
运维·docker·容器
4t4run2 小时前
28、Linux 系统定时任务
linux·运维·服务器
~黄夫人~3 小时前
Ansible 自动化运维:从 “手动输密码” 到 “一键免密管理”
linux·运维·自动化·ansible
cui__OaO3 小时前
Linux驱动--基于驱动设备分离的按键中断驱动
linux·运维·服务器·嵌入式
littlegirll3 小时前
ssh远程调用图形程序
运维·ssh·x11forwarding·远程调用图形界面
OnlyEasyCode3 小时前
Linux下载Navicat、特定版本Mysql
linux·运维·服务器