Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

foodcritic updates

  • Loading branch information...
commit f18d9ea528ea3db8b771f52d2c56f12cf9ea14e7 1 parent 27876c8
@phlipper authored
Showing with 20 additions and 20 deletions.
  1. +2 −2 templates/default/load.monitrc.erb
  2. +18 −18 templates/default/monitrc.erb
View
4 templates/default/load.monitrc.erb
@@ -1,7 +1,7 @@
-check system <%= node[:host] %>
+check system <%= node["fqdn"] %>
if loadavg (1min) > 4 for 2 cycles then alert
if loadavg (5min) > 2 for 2 cycles then alert
if memory usage > 75% for 2 cycles then alert
if cpu usage (user) > 70% for 2 cycles then alert
if cpu usage (system) > 30% for 2 cycles then alert
- if cpu usage (wait) > 20% for 2 cycles then alert
+ if cpu usage (wait) > 20% for 2 cycles then alert
View
36 templates/default/monitrc.erb
@@ -1,38 +1,38 @@
# Polling frequency
-set daemon <%= node[:monit][:polling_frequency] %>
+set daemon <%= node["monit"]["polling_frequency"] %>
# Logging
-<% if node[:monit][:syslog] == "true" %>
+<% if node["monit"]["syslog"] == "true" %>
set logfile syslog facility log_daemon
<% else %>
-set logfile <%= node[:monit][:logfile] %>
+set logfile <%= node["monit"]["logfile"] %>
<% end %>
# Mail alerts
-set alert <%= node[:monit][:alert_email] %>
-set mailserver <%= node[:monit][:mail][:hostname] %> port <%= node[:monit][:mail][:port] %>
- <% if node[:monit][:mail][:username] -%>
- username "<%= node[:monit][:mail][:username] %>"
+set alert <%= node["monit"]["alert_email"] %>
+set mailserver <%= node["monit"]["mail"]["hostname"] %> port <%= node["monit"]["mail"]["port"] %>
+ <% if node["monit"]["mail"]["username"] -%>
+ username "<%= node["monit"]["mail"]["username"] %>"
<% end -%>
- <% if node[:monit][:mail][:password] -%>
- password "<%= node[:monit][:mail][:password] %>"
+ <% if node["monit"]["mail"]["password"] -%>
+ password "<%= node["monit"]["mail"]["password"] %>"
<% end -%>
- <% if node[:monit][:mail][:tls] -%>
+ <% if node["monit"]["mail"]["tls"] -%>
using tlsv1
<% end -%>
- with timeout <%= node[:monit][:mail][:timeout] %> seconds
+ with timeout <%= node["monit"]["mail"]["timeout"] %> seconds
set mail-format {
- from: <%= node[:monit][:mail][:from] %>
- subject: <%= node[:monit][:mail][:subject] %>
- message: <%= node[:monit][:mail][:message] %>
+ from: <%= node["monit"]["mail"]["from"] %>
+ subject: <%= node["monit"]["mail"]["subject"] %>
+ message: <%= node["monit"]["mail"]["message"] %>
}
-<% if node[:monit][:web_interface][:enable] %>
+<% if node["monit"]["web_interface"]["enable"] %>
# Web interface
-set httpd port <%= node[:monit][:web_interface][:port] %> and
- use address <%= node[:monit][:web_interface][:address] %>
- <% node[:monit][:web_interface][:allow].each do |allow| -%>
+set httpd port <%= node["monit"]["web_interface"]["port"] %> and
+ use address <%= node["monit"]["web_interface"]["address"] %>
+ <% node["monit"]["web_interface"]["allow"].each do |allow| -%>
allow <%= allow %>
<% end %>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.