Prometheus + Grafana 监控系统搭建使用指南-elasticsearch_exporter 安装配置

ElasticSearch 接入 Prometheus

系列文章目录

  1. Prometheus 的安装部署
  2. Grafana的安装部署
  3. Linux服务器接入Prometheus监控-Node Exporter 安装指南
  4. Prometheus 接入SpringBoot微服务监控
  5. Mysql 接入 Prometheus
  6. RocketMQ 接入Prometheus 监控
  7. ElasticSearch 接入 Prometheus
  8. Nacos 接入 Prometheus 监控
  9. Redis 接入 Prometheus 监控系统
  10. Prometheus + Grafana 监控系统-告警规则配置
  11. Prometheus + Grafana 监控系统-PrometheusAlert安装与配置指南

在这里插入图片描述

  1. 下载安装 elasticsearch_exporter

    • 下载地址: https://github.com/prometheus-community/elasticsearch_exporter
    cd /home/work/software/
    wget https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v1.7.0/elasticsearch_exporter-1.7.0.linux-amd64.tar.gz
    tar -xzvf elasticsearch_exporter-*.linux-amd64.tar.gz
    
    # 改名-可选
    #mv elasticsearch_exporter-1.7.0.linux-amd64 elasticsearch_exporter
    
    • 注册成一个service
    useradd esadmin
    vim /etc/systemd/system/elasticsearch_exporter.service
    
    # 内容如下:
    [Unit]
    Description=Redis Exporter  
    After=network.target
      
    [Service]  
    User=esadmin
    ExecStart=/home/work/software/elasticsearch_exporter/elasticsearch_exporter \
    --collector.clustersettings \
    --collector.snapshots \
    --es.all \
    --es.indices \
    --es.node="_local" \
    --es.indices_settings \
    --es.shards \
    --es.timeout=15s \
    --es.ssl-skip-verify \
    --es.clusterinfo.interval=5m \
    --es.uri http://elastic:elastic_password@127.0.0.1:9200 \
    --web.listen-address=:9114
    
    ExecReload=/bin/kill -HUP
    Restart=on-failure
      
    [Install]  
    WantedBy=multi-user.target
    
    • 管理 elasticsearch_exporter 服务
      sudo systemctl daemon-reload
      sudo systemctl enable elasticsearch_exporter  
      sudo systemctl start elasticsearch_exporter
      
      # 查看效果
      curl http://localhost:9114/metrics
      
  2. 集成到Prometheus

    • prometheus.yml 增加如下配置即可
    scrape_configs
      - job_name: "elasticsearch_exporter"
        static_configs:
          - targets: ["stg-es:9114"]
    
  3. Grafana 添加 对应 仪表盘

  • 官方版本: https://grafana.com/grafana/dashboards/14191-elasticsearch-overview/
  • 在这里插入图片描述
  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值