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

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.dtcms.com/a/314382.html

相关文章:

  • Kali基础知识点【2】
  • 【论文阅读】ACE: Explaining cluster from an adversarial perspective
  • 【Java】HashMap线程安全吗?
  • 随笔之 ClickHouse 列式分析数据库安装注意事项及基准测试
  • clickhouse 中文数据的正则匹配
  • 【盘古100Pro+开发板实验例程】FPGA学习 | 3X3图像矩阵生成 | 图像实验指导手册
  • Exporters | 安装mysqld_exporter
  • SpringCloud相关知识
  • 晨控CK-GW08S与汇川AC系列PLC配置Ethernet/IP通讯连接手册
  • DevOps平台大比拼:Gitee、Jenkins与CircleCI如何选型?
  • 乐思 AI 智能识别平台(基于 YOLO,.NET+Vue3 开发)开源指南
  • 【秋招笔试】2025.08.03-拼多多笔试真题-第二题
  • 自然语言理解领域算法模型演进图谱
  • 2025最新、UI媲美豆包、DeepSeek等AI大厂的AIGC系统 - IMYAI源码部署教程
  • 多级表头的导出
  • 人大金仓数据库常见问题(持续更新)
  • SJW-app-1
  • [Sensors]BMI270 FIFO的使用
  • 对于类似std::shared_ptr但有可能空悬的指针使用std::weak_ptr: Effective Modern C++ 条款20
  • Shell 脚本发送信号给 C 应用程序,让 C 应用程序回收线程资源后自行退出。
  • Linux服务器管理MySQL数据库的常见命
  • Spring AI 系列之三十三 - Spring AI Alibaba-Graph框架之人类反馈
  • 区块链基础之Merkle B+树
  • 【Spring】SpringBoot自动注入原理分析,@SpringBootApplication、@EnableAutoConfiguration详解
  • Java类与对象练习题
  • 运动想象 (MI) 分类学习系列 (18) : MSVTNet
  • 一(1)关于单链表中的疑问
  • Spring AI实战:SpringBoot项目结合Spring AI开发——提示词(Prompt)技术与工程实战详解
  • SAP-ABAP:ABAP Open SQL 深度解析:核心特性、性能优化与实践指南
  • 设计模式 -> 策略模式(Strategy Pattern)