-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis config: exlude LWRP suggestion from foodcritic, Bump version o…
…f foodcritic to 4.0.0, Delete link to RDOC, Cleanup foodcritic warnings: normalize node attribute access to string vs symbol, update service notification, update conditional in recipes/default... Addresses Issue #58
- Loading branch information
Showing
9 changed files
with
87 additions
and
86 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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,36 +1,36 @@ | ||
default[:monit][:notify_email] = "[email protected]" | ||
default[:monit][:alert_blacklist] = %w( action, instance, pid, ppid ) | ||
default["monit"]["notify_email"] = "[email protected]" | ||
default["monit"]["alert_blacklist"] = %w( action, instance, pid, ppid ) | ||
|
||
default[:monit][:logfile] = 'syslog facility log_daemon' | ||
default["monit"]["logfile"] = 'syslog facility log_daemon' | ||
|
||
default[:monit][:poll_period] = 60 | ||
default[:monit][:poll_start_delay] = 120 | ||
default["monit"]["poll_period"] = 60 | ||
default["monit"]["poll_start_delay"] = 120 | ||
|
||
default[:monit][:mail_format][:subject] = "$SERVICE $EVENT" | ||
default[:monit][:mail_format][:from] = "monit@#{node['fqdn']}" | ||
default[:monit][:mail_format][:message] = <<-EOS | ||
default["monit"]["mail_format"]["subject"] = "$SERVICE $EVENT" | ||
default["monit"]["mail_format"]["from"] = "monit@#{node['fqdn']}" | ||
default["monit"]["mail_format"]["message"] = <<-EOS | ||
Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION. | ||
Yours sincerely, | ||
monit | ||
EOS | ||
|
||
default[:monit][:mailserver][:host] = "localhost" | ||
default[:monit][:mailserver][:port] = nil | ||
default[:monit][:mailserver][:username] = nil | ||
default[:monit][:mailserver][:password] = nil | ||
default[:monit][:mailserver][:password_suffix] = nil | ||
default[:monit][:mailserver][:encryption] = nil | ||
default[:monit][:mailserver][:timeout] = 60 | ||
default["monit"]["mailserver"]["host"] = "localhost" | ||
default["monit"]["mailserver"]["port"] = nil | ||
default["monit"]["mailserver"]["username"] = nil | ||
default["monit"]["mailserver"]["password"] = nil | ||
default["monit"]["mailserver"]["password_suffix"] = nil | ||
default["monit"]["mailserver"]["encryption"] = nil | ||
default["monit"]["mailserver"]["timeout"] = 60 | ||
|
||
default[:monit][:port] = 3737 | ||
default[:monit][:address] = nil | ||
default[:monit][:ssl] = false | ||
default[:monit][:cert] = "/etc/monit/monit.pem" | ||
default[:monit][:allow] = [] | ||
default[:monit][:username] = nil | ||
default[:monit][:password] = nil | ||
default[:monit][:ssh_port] = 22 | ||
default["monit"]["port"] = 3737 | ||
default["monit"]["address"] = nil | ||
default["monit"]["ssl"] = false | ||
default["monit"]["cert"] = "/etc/monit/monit.pem" | ||
default["monit"]["allow"] = [] | ||
default["monit"]["username"] = nil | ||
default["monit"]["password"] = nil | ||
default["monit"]["ssh_port"] = 22 | ||
|
||
default[:monit][:eventqueue][:set] = true | ||
default[:monit][:eventqueue][:basedir] = "/var/monit" | ||
default[:monit][:eventqueue][:slots] = 1000 | ||
default["monit"]["eventqueue"]["set"] = true | ||
default["monit"]["eventqueue"]["basedir"] = "/var/monit" | ||
default["monit"]["eventqueue"]["slots"] = 1000 |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
default[:monit][:unicorn][:pid_dir] = '/path/to/pids' | ||
default[:monit][:unicorn][:worker_count] = 1 | ||
default["monit"]["unicorn"]["pid_dir"] = '/path/to/pids' | ||
default["monit"]["unicorn"]["worker_count"] = 1 |
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
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
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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
set daemon <%= @node[:monit][:poll_period] %> | ||
<% if @node[:monit][:poll_start_delay] %> | ||
with start delay <%= @node[:monit][:poll_start_delay] %> | ||
set daemon <%= @node["monit"]["poll_period"] %> | ||
<% if @node["monit"]["poll_start_delay"] %> | ||
with start delay <%= @node["monit"]["poll_start_delay"] %> | ||
<% end %> | ||
|
||
set logfile <%= @node[:monit][:logfile] %> | ||
set logfile <%= @node["monit"]["logfile"] %> | ||
|
||
set mailserver <%= @node[:monit][:mailserver][:host] %><%= " port #{@node[:monit][:mailserver][:port]}" if @node[:monit][:mailserver][:port] %> | ||
<% if @node[:monit][:mailserver][:username] %> | ||
username "<%= @node[:monit][:mailserver][:username] %>" | ||
set mailserver <%= @node["monit"]["mailserver"]["host"] %><%= " port #{@node["monit"]["mailserver"]["port"]}" if @node["monit"]["mailserver"]["port"] %> | ||
<% if @node["monit"]["mailserver"]["username"] %> | ||
username "<%= @node["monit"]["mailserver"]["username"] %>" | ||
<% end %> | ||
<% if @node[:monit][:mailserver][:password] %> | ||
password "<%= @node[:monit][:mailserver][:password] %>"<%= " #{@node[:monit][:mailserver][:password_suffix]}" if @node[:monit][:mailserver][:password_suffix] %> | ||
<% if @node["monit"]["mailserver"]["password"] %> | ||
password "<%= @node["monit"]["mailserver"]["password"] %>"<%= " #{@node["monit"]["mailserver"]["password_suffix"]}" if @node["monit"]["mailserver"]["password_suffix"] %> | ||
<% end %> | ||
<% if @node[:monit][:mailserver][:encryption] %> | ||
using <%= @node[:monit][:mailserver][:encryption] %> | ||
<% if @node["monit"]["mailserver"]["encryption"] %> | ||
using <%= @node["monit"]["mailserver"]["encryption"] %> | ||
<% end %> | ||
<% if @node[:monit][:mailserver][:timeout] %> | ||
with timeout <%= @node[:monit][:mailserver][:timeout] %> seconds | ||
<% if @node["monit"]["mailserver"]["timeout"] %> | ||
with timeout <%= @node["monit"]["mailserver"]["timeout"] %> seconds | ||
<% end %> | ||
|
||
<% if @node[:monit][:eventqueue][:set] %> | ||
<% if @node["monit"]["eventqueue"]["set"] %> | ||
set eventqueue | ||
basedir <%= @node[:monit][:eventqueue][:basedir] %> # set the base directory where events will be stored | ||
<%= "slots #{@node[:monit][:eventqueue][:slots]}" if @node[:monit][:eventqueue][:slots] %> | ||
basedir <%= @node["monit"]["eventqueue"]["basedir"] %> # set the base directory where events will be stored | ||
<%= "slots #{@node["monit"]["eventqueue"]["slots"]}" if @node["monit"]["eventqueue"]["slots"] %> | ||
<% end %> | ||
|
||
set mail-format { | ||
from: <%= @node[:monit][:mail_format][:from] %> | ||
subject: <%= @node[:monit][:mail_format][:subject] %> | ||
message: <%= @node[:monit][:mail_format][:message] %> | ||
from: <%= @node["monit"]["mail_format"]["from] %> | ||
subject: <%= @node["monit"]["mail_format"]["subject"] %> | ||
message: <%= @node["monit"]["mail_format"]["message"] %> | ||
} | ||
|
||
set alert <%= @node[:monit][:notify_email] %><%= " NOT ON { #{@node[:monit][:alert_blacklist].join(", ")} }" unless @node[:monit][:alert_blacklist].empty? %> | ||
set alert <%= @node["monit"]["notify_email"] %><%= " NOT ON { #{@node["monit"]["alert_blacklist"].join(", ")} }" unless @node["monit"]["alert_blacklist"].empty? %> | ||
|
||
set httpd port <%= @node[:monit][:port] %> | ||
<%= "use address #{@node[:monit][:address]}" if @node[:monit][:address] %> | ||
<% @node[:monit][:allow].each do |a| %> | ||
allow <%= "#{a}" %> | ||
set httpd port <%= @node["monit"]["port"] %> | ||
<%= "use address #{@node["monit"]["address"]}" if @node["monit"]["address"] %> | ||
<% @node["monit"]["allow"].each do |a| %> | ||
allow <%= "a" %> | ||
<% end %> | ||
<%= "allow #{@node[:monit][:username]}:#{@node[:monit][:password]}" if @node[:monit][:username] %> | ||
<% if node[:monit][:ssl] %> | ||
<%= "allow #{@node["monit"]["username"]}:#{@node["monit"]["password"]}" if @node["monit"]["username"] %> | ||
<% if node["monit"]["ssl"] %> | ||
ssl enable | ||
pemfile <%= @node[:monit][:cert] %> | ||
pemfile <%= @node["monit"]["cert"] %> | ||
<% end %> | ||
|
||
include /etc/monit/conf.d/*.conf |
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