Commit e175755d authored by Marin Jankovski's avatar Marin Jankovski

Add redis to monit configuration.

parent 0c3ea3ae
......@@ -223,6 +223,11 @@ default['gitlab']['monitrc']['disk_usage'] = {
:path => "/" # Path on the filesystem to monitor
}
default['gitlab']['monitrc']['redis'] = {
:redis_pid_path => "/var/run/redis/6379/redis_6379.pid"
}
# Can be specified if you need to use different alert email in sidekiq monitor config
# If you need only one alert email, specify with https://github.com/phlipper/chef-monit/blob/1.4.0/attributes/default.rb#L27
default['gitlab']['monitrc']['notify_email'] = nil
......
......@@ -63,3 +63,12 @@ directory "#{gitlab['path']}/bin" do
mode 0755
action :create
end
redis = monitrc['redis']
monit_monitrc "redis" do
variables ({
host: gitlab['redis_host'],
port: gitlab['redis_port'],
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"
if failed host <%= @host %> port <%= @port %> 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