码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • elasticsearch-exporter部署手册


    目录

    • elasticsearch-exporter部署手册
      • 来源
      • 说明
      • 部署方式:
        • docker部署
        • 二进制文件部署

    elasticsearch-exporter部署手册

    来源

    https://github.com/prometheus-community/elasticsearch_exporter

    说明

    用于 ElasticSearch 的各种指标的 Prometheus 导出器,由 Go 语言编写。
    导出器在每次抓取时从 ElasticSearch 集群中获取信息,因此抓取间隔太短会给 ES 主节点带来负载,尤其是当您使用 --es.all 和 --es.indices 运行时。 我们建议您测量 ES 集群获取 /_nodes/stats 和 /_all/_stats 所需的时间,以确定您的抓取间隔是否太短。 作为最后的手段,您可以使用具有自己的抓取间隔的专用作业抓取此导出器。

    部署方式:

    docker部署

    docker pull quay.io/prometheuscommunity/elasticsearch-exporter:latest
    docker run --rm -p 9114:9114 quay.io/prometheuscommunity/elasticsearch-exporter:latest
    
    • 1
    • 2

    Example docker-compose.yml:

    elasticsearch_exporter:
        image: quay.io/prometheuscommunity/elasticsearch-exporter:latest
        command:
         - '--es.uri=http://elasticsearch:9200'
        restart: always
        ports:
        - "127.0.0.1:9114:9114"
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    二进制文件部署

    下载地址:
    https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v1.2.1/elasticsearch_exporter-1.2.1.linux-amd64.tar.gz

    解压进入目标文件夹后执行./elasticsearch_exporter --help可查看所有配置项;

    usage: elasticsearch_exporter []
    
    Flags:
      -h, --help                 Show context-sensitive help (also try --help-long
                                 and --help-man).
          --web.listen-address=":9114"
                                 Address to listen on for web interface and
                                 telemetry.
          --web.telemetry-path="/metrics"
                                 Path under which to expose metrics.
          --es.uri="http://localhost:9200"
                                 HTTP API address of an Elasticsearch node.
          --es.timeout=5s        Timeout for trying to get stats from Elasticsearch.
          --es.all               Export stats for all nodes in the cluster. If used,
                                 this flag will override the flag es.node.
          --es.node="_local"     Node's name of which metrics should be exposed.
          --es.indices           Export stats for indices in the cluster.
          --es.indices_settings  Export stats for settings of all indices of the
                                 cluster.
          --es.indices_mappings  Export stats for mappings of all indices of the
                                 cluster.
          --es.cluster_settings  Export stats for cluster settings.
          --es.shards            Export stats for shards in the cluster (implies
                                 --es.indices).
          --es.snapshots         Export stats for the cluster snapshots.
          --es.clusterinfo.interval=5m
                                 Cluster info update interval for the cluster label
          --es.ca=""             Path to PEM file that contains trusted Certificate
                                 Authorities for the Elasticsearch connection.
          --es.client-private-key=""
                                 Path to PEM file that contains the private key for
                                 client auth when connecting to Elasticsearch.
          --es.client-cert=""    Path to PEM file that contains the corresponding
                                 cert for the private key to connect to
                                 Elasticsearch.
          --es.ssl-skip-verify   Skip SSL verification when connecting to
                                 Elasticsearch.
          --log.level="info"     Sets the loglevel. Valid levels are debug, info,
                                 warn, error
          --log.format="logfmt"  Sets the log format. Valid formats are json and
                                 logfmt
          --log.output="stdout"  Sets the log output. Valid outputs are stdout and
                                 stderr
          --version              Show application version.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44

    根据自己的需求拼接参数;

  • 相关阅读:
    qlib高阶应用之财务数据库与自定义表达式
    业界中说的快速原型法是什么
    Cmake 报错 Could not find a package configuration file provided by “OpenCV“
    单片机只会调库和复制别人的代码是什么水平?
    StableDiffusion学习
    告别if else,试试这款轻量级流程引擎吧,自带IDEA插件真香
    切糕 小白月赛45
    Lua篇笔记
    C++中自定义数据结构作为unordered-set以及set中的元素
    工厂从自动化到数字孪生,图扑能干什么?
  • 原文地址:https://blog.csdn.net/m0_67401660/article/details/126360068
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号