redis_exporter icon indicating copy to clipboard operation
redis_exporter copied to clipboard

Not clear how redis-exporter should be used with clustered redis on AWS.

Open dee0sap opened this issue 2 years ago • 0 comments

Describe the problem

Not clear how redis-exporter should be used with clustered redis on AWS.

We're using service-catalog + an Open Service Broker + Crossplane to provision redis on AWS.

Our customers create a ServiceInstance and the service-catalog ( an operator ) makes the calls to the Open Service Broker to provision redis. Our customers also create a ServiceBinding which names a Secret that the service-catalog will store the connection details in.

For monitoring they are trying to use redis_exporter. The exporter deployment is getting the value of REDIS_ADDR from the above Secret.

If they don't set REDIS_EXPORTER_IS_CLUSTER they see data in Grafana/Prometheus/Thanos. They can see cluster mode = true and the info that describes the cluster config ( e.g. how many nodes ) seems correct. However the actual performance metrics, e.g. CPU usage data, seems to just be for whichever node the exporter happened to connect to at that moment.

If they set REDIS_EXPORTER_IS_CLUSTER=true then /metrics hangs and no data shows up. In the exporter log this message shows up time="2022-11-21T23:54:17Z" level=error msg="Cluster refresh failed: redisc: all nodes failed\nread tcp XXX.XXX.XXX.XXX:48052->YYY.YYY.YYY.YYY:6379: i/o timeout" ( I have redacted the client and server IPs )

At the moment is isn't clear how we should be using redis_exporter with a redis cluster.

  • Is the /metrics hang mentioned above a bug or do we have something misconfigured?
  • Do we need REDIS_EXPORTER_IS_CLUSTER=true at all?
  • If REDIS_EXPORTER_IS_CLUSTER=true wouldn't cause a hang would redis_exporter gather the metrics for all nodes or would it just gather metrics for the node it happened to connect to?

What version of redis_exporter are you running? Please run redis_exporter --version if you're not sure what version you're running. [ ] 0.3x.x [x] 1.x.x 1.45.0

Running the exporter What's the full command you're using to run the exporter? (please remove passwords and other sensitive data) Please include details about env variables, command line parameters, your orchestration setup, etc.

Default command/entrypoint used.

Setting env vars REDIS_EXPORTER_DEBUG: true REDIS_ADDR: rediss://:[password]@clustercfg.[name].[zone name].[region name].cache.amazonaws.com:6379 And trying to use the following but not sure if desirable REDIS_EXPORTER_IS_CLUSTER: true

Screenshots If applicable, add screenshots to help explain your question.

Additional context Add any other context about the question here.

dee0sap avatar Nov 28 '22 23:11 dee0sap