Redis

Redis

Redis Check validates connectivity to a Redis instance and optionally checks for authentication and operation mode (standalone or cluster).

Usage with Binary

./wait4it -type=redis -h=127.0.0.1 -p=6379 -t=60 -P=secret

Usage with Docker

docker run ph4r5h4d/wait4it -type=redis -h=127.0.0.1 -p=6379 -t=60 -P=secret

Environment Variables

VariableDescriptionDefault
W4IT_TYPEThe type of check (set to redis for Redis check).-
W4IT_TIMEOUTTimeout in seconds.30
W4IT_HOSTThe host to check.127.0.0.1
W4IT_PORTThe port to check on the Redis host.6379
W4IT_PASSWORDThe password for Redis authentication (if any).-
W4IT_OPERATION_MODEThe Redis operation mode (standalone or cluster).standalone

Command-Line Arguments

ArgumentDescriptionDefault
-typeThe type of check (set to redis).-
-tTimeout in seconds.30
-hThe host to check.127.0.0.1
-pThe port to check on the Redis host.6379
-PThe password for Redis authentication (if any).-
-operation-modeThe Redis operation mode (standalone or cluster).standalone

Notes

ℹ️
  • Environment variables override command-line arguments.
  • If W4IT_OPERATION_MODE is not defined, it defaults to standalone.
  • Redis Sentinel is not supported yet.
  • This version can only check one host within a Redis cluster; support for checking multiple hosts in a Redis cluster might be added upon request.

Exit Codes

CodeMeaning
0Connection successful.
1Timed out.
2Validation error or incorrect input.