Health checking in Redis
Checking the Redis Server's health status is important in troubleshooting issues. By monitoring the metrics and statistics information, we can often see what has happened or is happening on the server and may deduce the root cause of the issues. In this recipe, we will introduce a couple of Redis Server metrics or statistics that you should keep an eye on when troubleshooting issues.
Getting ready…
You need to finish the installation of Redis Server as we described in the Downloading and installing Redis recipe in Chapter 1, Getting Ready with Redis.
How to do it...
The steps for health checking in Redis are as follows:
- To get Redis metrics and statistics information, use the
INFO
command with the following section:
127.0.0.1:6379> INFO stats
# Stats
total_connections_received:1
total_commands_processed:18
instantaneous_ops_per_sec:0
total_net_input_bytes:671
total_net_output_bytes:13183
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections...