Redis Cluster : How to see "CLUSTER SLOTS" received requests?

Hello all !

I’d like to see everything happening between my nodes and client calls,

with the redis-cli MONITOR command I can see PING or HGETALL but I don’t see the “CLUSTER SLOTS” requests or MOVED requests

Examples :

  1. ./redis-cli -c -h host -p 7002 HGETALL “key” <= the key is on the node 7003 so I see the “HGETALL” on 7003’s MONITOR but nothing on the 7002’s MONITOR and no “MOVED” in the response

  2. ./redis-cli -c -h host -p 7001 CLUSTER SLOTS => nothing happens in MONITOR but I have a response

I need to see CLUSTER SLOTS because I’m querying Redis from PHP and want to monitor if the PHP module correctly cache the CLUSTER SLOTS responses

Thanks for your help!

Hi Thomas, you’re not seeing MOVED messages in your monitor because they are replies from Redis, not requests the client makes. There are MOVED replies, but no MOVED requrests.

As for CLUSTER SLOTS, the command doesn’t show up in MONITOR because it’s considered part of the more sensitive commands that don’t get logged by it. I believe it’s the same for all CLUSTER commands.

To properly log this information you need to act at the client level and introduce some logging there.