oliver006 / redis_exporter

Prometheus Exporter for ValKey & Redis Metrics. Supports ValKey and Redis 2.x, 3.x, 4.x, 5.x, 6.x, and 7.x
https://github.com/oliver006/redis_exporter
MIT License
3.03k stars 858 forks source link

When the password contains special symbols, Redis cannot be connected correctly #875

Closed ShuLian1984 closed 4 months ago

ShuLian1984 commented 4 months ago

Describe the problem

I use mkpasswd -l 24 -s 3 to create password, so redis password is:

nremdqWkbqp4$eeuw}f]vc1E

When the password contains special symbols, Redis cannot be connected correctly.

time="2024-02-06T06:29:34Z" level=error msg="Couldn't set client name, err: NOAUTH Authentication required."
time="2024-02-06T06:29:34Z" level=error msg="Redis INFO err: NOAUTH Authentication required."

and Other Redis connections that do not contain special characters are normal.

What version of redis_exporter are you running?

I only used versions: v1.50.0 and v1.55.0.

Unable to confirm if similar situations exist in other versions.

Running the exporter

commad: redis_exporter -web.listen-address=:1205 --redis.password-file=/opt/monitor/config/redis-password.json

cat redis-password.json
{
  "redis://172.19.182.41:6379":"nremdqWkbqp4$eeuw}f]vc1E"
}

Redis password cannot be changed, how to fix it?