Install
openclaw skills install sentinal-redisMonitor Redis server health, memory, performance, and BullMQ queues. Check queue depths, inspect failed jobs, analyze slow queries, and diagnose issues.
openclaw skills install sentinal-redisMonitor Redis server health, BullMQ queues, memory, and performance from any messaging channel. Ask questions in plain English — get actionable diagnostics.
✅ USE this skill when:
❌ DON'T use this skill when:
⚠️ CRITICAL: This skill is READ-ONLY. No exceptions.
FLUSHDB, FLUSHALL, DEL, UNLINK, SET, EXPIRE) — even if the user asks. Explain why and suggest they run it manually instead.CONFIG SET) — direct the user to do it themselves.REDIS_URL in output — it may contain passwords. Always mask credentials before displaying.If REDIS_URL is set, use it for all commands:
redis-cli -u "$REDIS_URL" <command>
If REDIS_URL is not set, default to localhost:
redis-cli <command>
For password-protected instances without REDIS_URL:
redis-cli -h <host> -p <port> -a <password> <command>
Always test connectivity first:
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" ping
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" ping
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info server
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info clients
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info server | grep -E "redis_version|uptime_in_days|uptime_in_seconds|connected_clients"
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info memory
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info memory | grep -E "used_memory_human|used_memory_peak_human|used_memory_rss_human|mem_fragmentation_ratio|maxmemory_human|maxmemory_policy"
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" memory doctor
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" memory usage <key>
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" --bigkeys
mem_fragmentation_ratio > 1.5 → High fragmentation, consider restarting Redismem_fragmentation_ratio < 1.0 → Redis is swapping to disk, CRITICALused_memory approaching maxmemory → Eviction will start based on maxmemory_policymemory doctor reports "Sam, I have no memory problems" → All goodredis-cli -u "${REDIS_URL:-redis://localhost:6379}" slowlog get 10
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" slowlog len
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" config get slowlog-log-slower-than
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" --latency -c 10
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" --latency-history -i 1 -c 5
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info keyspace
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info commandstats
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" client list
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" info clients | grep -E "connected_clients|blocked_clients|tracking_clients"
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" client list | awk -F' ' '{for(i=1;i<=NF;i++) if($i ~ /^idle=/) print $0}' | grep -E 'idle=[3-9][0-9]{2,}|idle=[0-9]{4,}'
BullMQ uses Redis as its backend. Queues follow the key pattern bull:<queue-name>:<state>.
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" scan 0 match "bull:*:meta" count 100
For a queue named <queue>:
echo "=== Queue: <queue> ==="
echo -n "Waiting: "; redis-cli -u "${REDIS_URL:-redis://localhost:6379}" llen "bull:<queue>:wait"
echo -n "Active: "; redis-cli -u "${REDIS_URL:-redis://localhost:6379}" llen "bull:<queue>:active"
echo -n "Delayed: "; redis-cli -u "${REDIS_URL:-redis://localhost:6379}" zcard "bull:<queue>:delayed"
echo -n "Failed: "; redis-cli -u "${REDIS_URL:-redis://localhost:6379}" zcard "bull:<queue>:failed"
echo -n "Completed: "; redis-cli -u "${REDIS_URL:-redis://localhost:6379}" zcard "bull:<queue>:completed"
echo -n "Paused: "; redis-cli -u "${REDIS_URL:-redis://localhost:6379}" llen "bull:<queue>:paused"
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" zrange "bull:<queue>:failed" 0 9
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" hgetall "bull:<queue>:<jobId>"
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" hmget "bull:<queue>:<jobId>" data failedReason stacktrace attemptsMade timestamp processedOn finishedOn
Active jobs that haven't been updated recently may be stuck:
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" lrange "bull:<queue>:active" 0 -1
Then for each job ID, check processedOn timestamp:
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" hmget "bull:<queue>:<jobId>" processedOn name
If processedOn is more than 10 minutes old and job is still active, it may be stuck.
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" xinfo groups "bull:<queue>:events" 2>/dev/null || echo "No event stream found"
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" zrange "bull:<queue>:repeat" 0 -1
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" scan 0 match "<pattern>" count 100
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" type <key>
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" ttl <key>
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" object encoding <key>
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" object idletime <key>
redis-cli -u "${REDIS_URL:-redis://localhost:6379}" eval "local count = 0; local cursor = '0'; repeat local result = redis.call('SCAN', cursor, 'MATCH', ARGV[1], 'COUNT', 1000); cursor = result[1]; count = count + #result[2]; until cursor == '0'; return count" 0 "<prefix>*"
Run the health check script for a comprehensive overview:
bash scripts/redis-health.sh "${REDIS_URL:-redis://localhost:6379}"
This script outputs:
redis-cli --latency -c 10slowlog get 10connected_clients → if > 1000, investigate connection poolingblocked_clients → if > 0, check BLPOP/BRPOP consumersinfo memory → check used_memory vs maxmemory--bigkeys → find largest keysmaxmemory_policy → is eviction configured?memory doctor → follow recommendationsttl on large keyswait?active list → are jobs stuck in active state?processedOn too oldxinfo groups to verify workers are connectedfailed set → read failedReason and stacktracezrange bull:<queue>:failed -10 -1failedReason and stacktraceattemptsMade → are retries exhausted?data → is the payload malformed?redis://localhost:6379 if REDIS_URL is not setscan command is safe for production (non-blocking), unlike keys which should NEVER be used in productionbull:. If a custom prefix is used, replace bull: accordingly-c flag to redis-cli commands