Redis monitoring

Redis offers CLI (command line interface) tools for monitoring. To check if Redis process is working fine you should issue following command on the server where it runs:

redis-cli ping

Feedback is given with the exit code of the command above. You can get it's value from environment variable $? with following command

echo $?

Below you can find meaning of the exit codes

Exit code ($?)Meaning
0OK - Works fine
2CRIT - There are some issues with Redis

Redis itself opens following ports

6379/TCPData exchange

This port can be used for checking if the service is still running.