Commit 933a9b39 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'monit_redis' into 'master'

Monit config for redis
parents 0c3ea3ae b3c8980e
......@@ -223,6 +223,12 @@ default['gitlab']['monitrc']['disk_usage'] = {
:path => "/" # Path on the filesystem to monitor
}
default['gitlab']['monitrc']['redis'] = {
:service_name => "/etc/init.d/redis6379",
: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,13 @@ 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'],
service_name: redis['service_name'],
redis_pid_path: redis['redis_pid_path']
})
end
check process redis-server with pidfile <%= @redis_pid_path %>
start program = "<%= @service_name %> start"
stop program = "<%= @service_name %> stop"
if failed host <%= @host %> port <%= @port %>
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