redis-exporter部署

2022-09-19 11:50:36 浏览数 (1)

# 1.创建目录

代码语言:javascript复制
[root@summer exporter]# mkdir -p /opt/exporter
[root@summer exporter]# cd /opt/exporter

# 2.解压

代码语言:javascript复制
[root@summer src]# tar -zxvf redis_exporter-v1.13.1.linux-amd64.tar.gz 
redis_exporter-v1.13.1.linux-amd64/
redis_exporter-v1.13.1.linux-amd64/README.md
redis_exporter-v1.13.1.linux-amd64/redis_exporter
redis_exporter-v1.13.1.linux-amd64/LICENSE
[root@summer src]# mv redis_exporter-v1.13.1.linux-amd64 redis_exporter

# 3.修改名称

代码语言:javascript复制
[root@summer exporter]# mv /home/summer/bushu3.1/src/redis_exporter ./
[root@summer exporter]# ll
total 0
drwxr-xr-x 2 summer summer 176 Dec  1 14:17 elasticsearch_exporter
drwxr-xr-x 2 root        root         60 Nov  2 22:47 redis_exporter
[root@summer exporter]# 

# 4.启动服务

代码语言:javascript复制
[root@summer redis_exporter]# nohup ./redis_exporter -redis.addr 192.168.0.9:6379 &
[2] 19693

  • 参数说明:
代码语言:javascript复制
[root@summer redis_exporter]# ./redis_exporter -h
Usage of ./redis_exporter:
  -check-keys string
    	Comma separated list of key-patterns to export value and length/size, searched for with SCAN
  -check-single-keys string
    	Comma separated list of single keys to export value and length/size
  -check-single-streams string
    	Comma separated list of single streams to export info about streams, groups and consumers
  -check-streams string
    	Comma separated list of stream-patterns to export info about streams, groups and consumers, searched for with SCAN
  -config-command string
    	What to use for the CONFIG command (default "CONFIG")
  -connection-timeout string
    	Timeout for connection to Redis instance (default "15s")
...

# 6.验证

访问:http://IP:9121/metrics

# 7.展示

  • 所用模板:763

0 人点赞