For redis to check port 6379.

Issue #531 closed
Former user created an issue

My monit version is 5.20.0

And My check redis config as below:

check process redis with pidfile /var/run/redis/redis-server.pid
  group redis
  start program = "/etc/init.d/redis-server start" with timeout 60 seconds
  stop program  = "/etc/init.d/redis-server stop" with timeout 60 seconds
  restart program  = "/etc/init.d/redis-server restart" with timeout 60 seconds
  if failed host  127.0.0.1 port 6379 protocol http then restart
  if 3 restarts within 5 cycles then timeout
  depends on redis_init
  alert

And My receive the alert as below:

[UTC Dec 23 10:05:11] error    : 'redis' failed protocol test [HTTP] at [127.0.0.1]:6379 [TCP/IP] -- HTTP error: Cannot parse HTTP status in response: -ERR unknown command 'HEAD'

Comments (1)

  1. Tildeslash repo owner

    You use the HTTP protocol test instead of REDIS:

    if failed host  127.0.0.1 port 6379 protocol http then restart
    

    The redis protocol can be set like this:

    if failed host  127.0.0.1 port 6379 protocol redis then restart
    
  2. Log in to comment