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

Home Page:https://github.com/oliver006/redis_exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fetching extra config metrics fails on cloud managed Redis instances

ccorbacho opened this issue · comments

Describe the problem
Attempts to fetch the extra config metrics for a Redis instance fail on cloud managed Redis instances - on at least AWS Elasticache and GCP Memorystore.

{"level":"debug","msg":"c.Do() - err: ERR unknown command 'CONFIG', with args beginning with: 'GET' '*' ","time":"2024-05-17T10:11:09Z"}
{"level":"debug","msg":"c.Do() - done","time":"2024-05-17T10:11:09Z"}
{"level":"debug","msg":"Redis CONFIG err: ERR unknown command 'CONFIG', with args beginning with: 'GET' '*' ","time":"2024-05-17T10:11:09Z"}

CONFIG is not an allowed command on most cloud managed Redis:

(This doesn't stop anything else, as the exporter continues onto the next ste of metrics).

What version of redis_exporter are you running?
1.59.0

Running the exporter
N/A (using the Docker image).

Expected behavior
Redis Exporter has a way to disable fetching the config metrics.

e.g. maybe a new environment variable to disable fetching these, so that we don't issue a command that will never succeed (and avoid these error messages when debug level logging is enabled).

Screenshots
N/A

Additional context
Add any other context about the problem here.

I like the idea of adding a flag to skip calling the CONFIG command, I think that makes sense. Alas, I don't have the bandwidth right now to add the feature myself.
Feel free to open a PR, happy to review it.