Commit b3c8980e authored by Marin Jankovski's avatar Marin Jankovski

Add service option for redis.

parent d65906b8
......@@ -224,6 +224,7 @@ default['gitlab']['monitrc']['disk_usage'] = {
}
default['gitlab']['monitrc']['redis'] = {
:service_name => "/etc/init.d/redis6379",
:redis_pid_path => "/var/run/redis/6379/redis_6379.pid"
}
......
......@@ -69,6 +69,7 @@ monit_monitrc "redis" do
variables ({
host: gitlab['redis_host'],
port: gitlab['redis_port'],
service_name: redis['service_name'],
redis_pid_path: redis['redis_pid_path']
})
end
check process redis-server with pidfile <%= @redis_pid_path %>
start program = "/etc/init.d/redis6379 start"
stop program = "/etc/init.d/redis6379 stop"
start program = "<%= @service_name %> start"
stop program = "<%= @service_name %> stop"
if failed host <%= @host %> port <%= @port %>
send "PING\r\n" expect "PONG\r\n"
send "PING\r\n" expect "+PONG\r\n"
then alert
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment