当前位置: 首页 > ds >正文

Exporters | 安装elasticsearch_exporter

文章目录

  • 一、下载linux版本的elasticsearch_exporter
  • 二、解压安装包
  • 三、创建启动服务文件
  • 四、启动服务
  • 五、查看端口和服务
  • 六、prometheus-server配置
  • 七、动态重启配置文件

一、下载linux版本的elasticsearch_exporter

下载地址:https://github.com/prometheus-community/elasticsearch_exporter

wget https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v1.5.0/elasticsearch_exporter-1.5.0.linux-amd64.tar.gz

二、解压安装包

tar -zxf elasticsearch_exporter-1.5.0.linux-amd64.tar.gz -C /data
mv /data/elasticsearch_exporter-* /data/elasticsearch_exporter
chown -R root.root /data/elasticsearch_exporter

三、创建启动服务文件

vim /usr/lib/systemd/system/elasticsearch_exporter.service
[Unit]
Description=Elasticsearch Exporter
Wants=network-online.target
After=network-online.target[Service]
User=root
Group=root
Type=simple
ExecStart=/data/es_exporter/elasticsearch_exporter \--es.all \--es.aliases \--es.cluster_settings \--es.indices \--es.indices_settings \--es.shards \--es.snapshots \--web.listen-address ":9114" \--es.ssl-skip-verify \--es.uri http://rio:ee012e12340a177f60766d35baa81955d@192.158.134.3:9200 \--es.timeout 20s \--es.clusterinfo.interval 5m
Restart=on-failure[Install]
WantedBy=multi-user.target

四、启动服务

systemctl daemon-reload
systemctl enable --now elasticsearch_exporter
systemctl status elasticsearch_exporter

五、查看端口和服务

ss -nltp|grep 9114

六、prometheus-server配置

prometheus.yml配置

scrape_configs:- job_name: 'elasticsearch-exporter'file_sd_configs:- files:- targets/elasticsearch*.yamlrefresh_interval: 2mrelabel_configs:- source_labels: [ '__address__' ]target_label: 'instance'regex: "(.*):.*"replacement: $1

elasticsearch_exporter.yaml

[root@test targets]# cat elasticsearch_exporter.yaml
- targets:- 192.158.134.8:9114- 192.158.134.9:9114- 192.158.134.11:9114labels:app: "elasticsearch-server"job: "elasticsearch-server"

七、动态重启配置文件

kill -HUP `pgrep prometheus`
http://www.xdnf.cn/news/17160.html

相关文章:

  • 力扣301:删除无效的括号
  • iostat 系统IO监控命令学习
  • AR技术赋能轨道交通培训:虚实结合提升学习效率
  • Kotlin Daemon 简介
  • 从零开始搞定类与对象(中)
  • AI 面试 vs 真人面试:破解企业招聘效率困局
  • 【STM32】GPIO的输入输出
  • 数据结构(2)
  • SpringBoot3.0+Vue3.0开源版考试系统
  • ubuntu22.04系统实践 linux基础入门命令(三) 用户管理命令
  • 抗辐照DCDC与MCU在核环境监测设备中的集成应用
  • Jwts用于创建和验证 ​​JSON Web Token(JWT)​​ 的开源库详解
  • 【MATLAB例程】水下AUV自主导航定位例程,定位使用TDOA(到达时间差),适用于三维环境,附代码下载链接
  • MySQL详解
  • ICCV 2025|单视频生成动态4D场景!中科大微软突破4D生成瓶颈,动画效果炸裂来袭!
  • Linux下载安装mysql,客户端(Navicat)连接Linux中的mysql
  • 消防器材检测数据集介绍-9,600 张图片 智慧安防系统 建筑施工安全监管 AI 消防巡检机器人 自动审核系统 公共场所安全监测
  • 【核心技术二】Uvicorn:高性能 ASGI 服务器
  • React Hooks 原理深度解析与最佳实践
  • 在CentOS 7上安装配置MySQL 8.0完整指南
  • JVM-垃圾回收器与内存分配策略详解
  • 模拟-6.N字形变换-力扣(LeetCode)
  • 基于springboot的学习辅导系统设计与实现
  • 【深度学习新浪潮】谷歌新推出的AlphaEarth是款什么产品?
  • spring-ai-alibaba 之 graph 槽点
  • 若没有安全可靠性保障,对于工程应用而言,AI或许就是大玩具吗?
  • 嵌入式通信协议解析(基于红外NEC通信协议)
  • 深入解析C++函数重载:从原理到实践
  • 模型学习系列之参数
  • C# LINQ(LINQ to XML)