The current repo belongs to Paused status, and some functions are restricted. For details, please refer to the description of repo status
14 Star 24 Fork 12

pippo / redis-exporter
Paused

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
readme.md 1.18 KB
Copy Edit Raw Blame History
pippo authored 2018-07-01 16:21 . English md

redis-exporter

English

中文说明

  1. 获取redis状态信息
  2. 提供prometheus metrics

Docker

  1. 容器内编译
docker build -t redis-exporter:1 .
  1. 本地编译放入容器,此容器不超过20M
docker build -t redis-exporter:1 -f Dockerfile_busybox .
  1. docker运行
docker run -p 19100:19100 -e "REDIS_FILE=/conf/redis.yml" -v /opt/redis:/conf redis-exporter:1

配置文件

  1. 读取yaml文件
  2. 支持环境变量和命令行参数传入redis.yml配置文件,命令行参数推荐宿主机使用,环境变量适用于docker

环境变量

REDIS_FILE  config/redis.yml

命令行参数传入

./redis-exporter --redis.file=config/redis.yml

命令行参数查看

./redis-exporter -h
  1. redis.yml 文件说明 支持列表传入
redis_hosts:
  - host: 127.0.0.1     # redis host
    port: 6379          # redis port
    password: "redis"   # redis password,没有密码传入空string
    description: "test1" # description
  - host: 127.0.0.1
    port: 6380
    password: ""
    description: "test2"

License

GNU General Public License v3.0

Go
1
https://gitee.com/pippozq/redis-exporter.git
git@gitee.com:pippozq/redis-exporter.git
pippozq
redis-exporter
redis-exporter
master

Search