-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from shareaholic/riak_monit
Add a monit recipe to monitor and restart riak, for use in conjunction with the monit cookbook
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
default.riak.monit.process_matching = "/usr/lib/riak/erts-5.8.5/bin/beam.smp" | ||
default.riak.monit.start_program = "/usr/sbin/riak" | ||
default.riak.monit.http_host = "localhost" | ||
default.riak.monit.http_port = "8098" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This is an optional recipe that provides monit monitoring of your riak node. Requires the monit cookbook. | ||
|
||
include_recipe "monit::default" | ||
|
||
monitrc "riak" do | ||
variables( | ||
:process_matching => node[:riak][:monit][:process_matching], | ||
:start_program => node[:riak][:monit][:start_program], | ||
:http_host => node[:riak][:monit][:http_host], | ||
:http_port => node[:riak][:monit][:http_port] | ||
) | ||
template_source "riak-monit.conf.erb" | ||
template_cookbook "riak" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
check process riak matching "<%= @process_matching %>" | ||
group riak | ||
start program = "<%= @start_program %>" | ||
if failed host <%= @http_host %> port <%= @http_port %> protocol http | ||
and request "/" | ||
with timeout 2 seconds for 2 cycles | ||
then restart |