redis_exporter 安装

本文介绍了 redis_exporter 安装配置

什么是redis_exporter

Redis_exporter  用于Redis指标的Prometheus导出器。

安装redis_exporter

下载redis_exporter安装包(linux版)到 /opt/minitor/redis_exporter 。

解压 tar -zxvf redis_exporter-v0.13.linux-amd64.tar.gz ,解压文件到当前目录。

修改配置
vim /opt/minitor/prometheus/prometheus.yml,添加以下配置文件:

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'
 
    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.
 
    static_configs:
      - targets: ['ip:9090']
        labels:
          instance: prometheus
#下面是增加部分配置
  - job_name: redis
    static_configs:
      - targets: ['ip:9121']
        labels:
          instance: redis

启动 redis_exporter

nohup ./redis_exporter -redis.addr 10.32.0.72:6379 -redis.password "ruiyiTest" &  

在prometheus界面中查看redis的状态
图一

在grafana中查看配置状态(推荐使用763)
图二

效果

上一篇 下一篇


推荐文章

评论
说点什么吧?

发表评论

取消回复
  最新文章