All eyes on AI: 2026 predictions The shifts that will shape your stack.

Read now
For operators5.2 Getting Redis Statistics
Change into the observability-stats directory.
Requirements
  • docker
  • docker-compose
  • internet connection
Starting Environment
Connect to the Environment
In a terminal run this command to get a shell prompt inside the running Docker container:
Generate load
A simple way to to generate some load is to open another terminal and run:
Info
Since most of the stats data comes from the INFO command you should first run this to view that there.
Try piping this output to a file.
Memory usage
Since we generally recommend setting the maxmemory size, it is possible to calculate the percentage of memory in use and alert based on results of the maxmemory configuration value and the used_memory stat.
First set the maxmemory.
Then you can pull the two data points to see how that could be used to calculate memory usage.
Client data
You can pull the clients section of the INFO command
or maybe a particular metric you would want to track:
Stats section
Use redis-cli to list the full 'stats' section.
Hit ratio
A cache hit/miss ratio could be generated using two data points in the stats section.
Evicted keys
Eviction occurs when Redis has reached its maximum memory and maxmemory-policy in redis.conf is set to something other than volatile-lru.
Keyspace
The following data could be used for graphing the size of the keyspace as a quick drop or spike in the number of keys is a good indicator of issues.
Workload (connections received, commands processed)
The following stats are a good indicator of workload on the Redis server.