flapjack 0.7.29 → 0.7.30
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +8 -0
- data/bin/flapjack-nagios-receiver +20 -15
- data/bin/flapjack-populator +30 -13
- data/bin/flapper +1 -1
- data/bin/receive-events +13 -10
- data/bin/simulate-failed-check +13 -3
- data/dist/etc/init.d/flapjack +5 -42
- data/dist/etc/init.d/flapjack-nagios-receiver +3 -17
- data/dist/etc/init.d/flapper +3 -12
- data/etc/flapjack_config.yaml.example +81 -52
- data/features/cli.feature +30 -13
- data/features/cli_flapjack-nagios-receiver.feature +66 -0
- data/features/cli_flapjack-populator.feature +80 -0
- data/features/cli_flapper.feature +45 -0
- data/features/cli_receive-events.feature +27 -0
- data/features/cli_simulate-failed-check.feature +31 -0
- data/features/events.feature +3 -6
- data/features/packaging-lintian.feature +2 -2
- data/features/rollup.feature +2 -4
- data/features/steps/cli_steps.rb +25 -7
- data/features/steps/packaging-lintian_steps.rb +12 -6
- data/features/support/daemons.rb +11 -1
- data/features/support/env.rb +16 -4
- data/lib/flapjack/coordinator.rb +1 -1
- data/lib/flapjack/filters/delays.rb +1 -1
- data/lib/flapjack/gateways/email/alert.html.erb +1 -1
- data/lib/flapjack/gateways/email/alert.text.erb +1 -1
- data/lib/flapjack/gateways/email/rollup.html.erb +1 -1
- data/lib/flapjack/gateways/email/rollup.text.erb +1 -1
- data/lib/flapjack/gateways/web/views/check.html.erb +1 -1
- data/lib/flapjack/gateways/web/views/contact.html.erb +37 -32
- data/lib/flapjack/gateways/web.rb +7 -7
- data/lib/flapjack/logger.rb +25 -45
- data/lib/flapjack/version.rb +1 -1
- data/spec/lib/flapjack/coordinator_spec.rb +9 -7
- data/spec/lib/flapjack/logger_spec.rb +19 -13
- data/tasks/benchmarks.rake +1 -1
- data/tasks/support/flapjack_config_benchmark.yaml +1 -29
- metadata +97 -47
- checksums.yaml +0 -7
- data/bin/flapjack-netsaint-parser +0 -432
- data/dist/puppet/flapjack/files/.stub +0 -0
- data/dist/puppet/flapjack/manifests/common.pp +0 -61
- data/dist/puppet/flapjack/manifests/notifier.pp +0 -13
- data/dist/puppet/flapjack/manifests/worker.pp +0 -13
- data/dist/puppet/flapjack/templates/.stub +0 -0
- data/dist/puppet/ruby/manifests/dev.pp +0 -5
- data/dist/puppet/ruby/manifests/rubygems.pp +0 -14
- data/dist/puppet/sqlite3/manifests/dev.pp +0 -5
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## Flapjack Changelog
|
2
2
|
|
3
|
+
# 0.7.30 - 2013-11-06
|
4
|
+
- Feature: Make logging more configurable gh-27 (@ali-graham)
|
5
|
+
- Bug: 5 min default notification interval interferes with granularity of user set notification interval gh-156 (@jessereynolds)
|
6
|
+
- Bug: NoMethodError at /checks_all gh-330 (@ali-graham)
|
7
|
+
- Bug: Web UI assumes nil means 0 for rollup threshold gh-357 (@ali-graham)
|
8
|
+
- Chore: Update init scripts gh-350 (@ali-graham)
|
9
|
+
- Chore: Scripts in bin/ need to be better tested gh-305 (@jessereynolds)
|
10
|
+
|
3
11
|
# 0.7.29 - 2013-11-01
|
4
12
|
- Feature: Per contact media rollup complete gh-291 (@jessereynolds)
|
5
13
|
- Feature: Rollup - show alerting checks and rollup status for each media on contact page gh-326 (@jessereynolds)
|
@@ -1,5 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
# nagios.cfg must contain the following perfdata templates for host and service data (modified from the default
|
4
|
+
# to include hoststate / servicestate, and a fake service 'HOST' for hostperfdata, so that the
|
5
|
+
# fields match up:
|
6
|
+
#
|
7
|
+
# host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\tHOST\t$HOSTSTATE$\t$HOSTEXECUTIONTIME$\t$HOSTLATENCY$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
|
8
|
+
#
|
9
|
+
# service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
|
10
|
+
#
|
11
|
+
|
3
12
|
unless $:.include?(File.dirname(__FILE__) + '/../lib/')
|
4
13
|
$: << File.dirname(__FILE__) + '/../lib'
|
5
14
|
end
|
@@ -16,11 +25,6 @@ require 'dante'
|
|
16
25
|
require 'flapjack/configuration'
|
17
26
|
require 'flapjack/data/event'
|
18
27
|
|
19
|
-
def pike(message)
|
20
|
-
puts "piking out: #{message}"
|
21
|
-
exit 1
|
22
|
-
end
|
23
|
-
|
24
28
|
def process_input(opts)
|
25
29
|
redis = opts[:redis]
|
26
30
|
fifo = File.new(opts[:fifo])
|
@@ -109,7 +113,7 @@ optparse = OptionParser.new do |opts|
|
|
109
113
|
end
|
110
114
|
|
111
115
|
opts.on("-l", "--logfile [PATH]", String, "PATH to the logfile to write to") do |l|
|
112
|
-
options.
|
116
|
+
options.logfile = l
|
113
117
|
end
|
114
118
|
|
115
119
|
end
|
@@ -146,17 +150,18 @@ daemonize = options.daemonize.nil? ?
|
|
146
150
|
options.daemonize
|
147
151
|
|
148
152
|
|
149
|
-
# nagios.cfg contains the following templates for host and service data (modified from the default
|
150
|
-
# to include hoststate / servicestate, and a fake service 'HOST' for hostperfdata, so that the
|
151
|
-
# fields match up
|
152
|
-
# host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\tHOST\t$HOSTSTATE$\t$HOSTEXECUTIONTIME$\t$HOSTLATENCY$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
|
153
|
-
# service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
|
154
|
-
|
155
|
-
|
156
153
|
runner = Dante::Runner.new(exe, :pid_path => pidfile, :log_path => logfile)
|
157
154
|
case ARGV[0]
|
158
155
|
when "start", "restart"
|
159
|
-
|
156
|
+
unless File.exist?(fifo)
|
157
|
+
raise "No fifo (named pipe) file found at #{fifo}"
|
158
|
+
end
|
159
|
+
unless File.pipe?(fifo)
|
160
|
+
raise "The file at #{fifo} is not a named pipe, try using mkfifo to make one"
|
161
|
+
end
|
162
|
+
unless File.readable?(fifo)
|
163
|
+
raise "The fifo (named pipe) at #{fifo} is unreadable"
|
164
|
+
end
|
160
165
|
end
|
161
166
|
|
162
167
|
case ARGV[0]
|
@@ -194,7 +199,7 @@ when "status"
|
|
194
199
|
if runner.daemon_running?
|
195
200
|
puts "#{exe} is running: #{uptime}"
|
196
201
|
else
|
197
|
-
puts "#{exe} is not
|
202
|
+
puts "#{exe} is not running"
|
198
203
|
exit 3
|
199
204
|
end
|
200
205
|
|
data/bin/flapjack-populator
CHANGED
@@ -19,20 +19,20 @@ require 'flapjack/data/entity'
|
|
19
19
|
require 'flapjack/data/event'
|
20
20
|
|
21
21
|
options = OpenStruct.new
|
22
|
-
options.config
|
23
|
-
options.daemonize = nil
|
22
|
+
options.config = Flapjack::Configuration::DEFAULT_CONFIG_PATH
|
24
23
|
|
25
|
-
|
24
|
+
exe = File.basename(__FILE__)
|
26
25
|
|
27
|
-
|
28
|
-
banner
|
29
|
-
banner += " commands:\n"
|
30
|
-
banner += " - import-entities\n"
|
31
|
-
banner += " - import-contacts\n"
|
32
|
-
banner += " - purge-events (purge queued monitoring events)\n"
|
26
|
+
optparse = OptionParser.new do |opts|
|
27
|
+
opts.banner = "Usage: #{exe} COMMAND [OPTIONS]"
|
33
28
|
|
34
|
-
|
35
|
-
opts.
|
29
|
+
opts.separator ""
|
30
|
+
opts.separator "Commands:"
|
31
|
+
opts.separator " import-entities"
|
32
|
+
opts.separator " import-contacts"
|
33
|
+
opts.separator " purge-events purge queued monitoring events"
|
34
|
+
opts.separator ""
|
35
|
+
opts.separator "Options"
|
36
36
|
|
37
37
|
opts.on("-c", "--config [PATH]", String, "PATH to the config file to use") do |c|
|
38
38
|
options.config = c
|
@@ -42,7 +42,24 @@ OptionParser.new do |opts|
|
|
42
42
|
options.from = f
|
43
43
|
end
|
44
44
|
|
45
|
-
end
|
45
|
+
end
|
46
|
+
optparse.parse!(ARGV)
|
47
|
+
|
48
|
+
if options.help
|
49
|
+
puts optparse
|
50
|
+
exit
|
51
|
+
elsif options.version
|
52
|
+
puts Flapjack::VERSION
|
53
|
+
exit
|
54
|
+
elsif !["import-contacts", "import-entities", "purge-events"].include?(ARGV[0])
|
55
|
+
if ARGV.nil? || ARGV.empty?
|
56
|
+
puts "No command provided"
|
57
|
+
else
|
58
|
+
puts "Unknown command provided: '#{ARGV[0]}'"
|
59
|
+
end
|
60
|
+
puts "\n#{optparse}"
|
61
|
+
exit 1
|
62
|
+
end
|
46
63
|
|
47
64
|
FLAPJACK_ENV = ENV['FLAPJACK_ENV'] || 'production'
|
48
65
|
|
@@ -61,7 +78,7 @@ if options.from
|
|
61
78
|
file = File.new(filename)
|
62
79
|
end
|
63
80
|
|
64
|
-
case
|
81
|
+
case ARGV[0]
|
65
82
|
when "import-contacts"
|
66
83
|
contacts = Oj.load(file)
|
67
84
|
|
data/bin/flapper
CHANGED
data/bin/receive-events
CHANGED
@@ -141,16 +141,7 @@ redis_options = config.for_redis
|
|
141
141
|
|
142
142
|
if config_env.nil? || config_env.empty?
|
143
143
|
puts "No config data for environment '#{FLAPJACK_ENV}' found in '#{options.config}'"
|
144
|
-
|
145
|
-
end
|
146
|
-
|
147
|
-
unless options.source
|
148
|
-
puts "--source URL is required"
|
149
|
-
exit 1
|
150
|
-
end
|
151
|
-
|
152
|
-
unless options.follow || options.all
|
153
|
-
puts "one or both of --follow or --all is required"
|
144
|
+
puts "\n#{optparse}"
|
154
145
|
exit 1
|
155
146
|
end
|
156
147
|
|
@@ -166,6 +157,18 @@ else
|
|
166
157
|
end
|
167
158
|
end
|
168
159
|
|
160
|
+
unless options.source
|
161
|
+
puts "--source URL is required"
|
162
|
+
puts "\n#{optparse}"
|
163
|
+
exit 1
|
164
|
+
end
|
165
|
+
|
166
|
+
unless options.follow || options.all
|
167
|
+
puts "one or both of --follow or --all is required"
|
168
|
+
puts "\n#{optparse}"
|
169
|
+
exit 1
|
170
|
+
end
|
171
|
+
|
169
172
|
receive(:follow => options.follow,
|
170
173
|
:all => options.all,
|
171
174
|
:source => options.source,
|
data/bin/simulate-failed-check
CHANGED
@@ -52,7 +52,7 @@ def fail(opts)
|
|
52
52
|
EM.stop
|
53
53
|
end
|
54
54
|
|
55
|
-
EM.add_periodic_timer(
|
55
|
+
EM.add_periodic_timer(opts[:interval]) do
|
56
56
|
puts "#{Time.now}: sending failure event (#{state}) for #{key}"
|
57
57
|
send_event(failure.merge('time' => Time.now.to_i), :redis => redis)
|
58
58
|
end
|
@@ -86,6 +86,10 @@ optparse = OptionParser.new do |opts|
|
|
86
86
|
options.minutes = t
|
87
87
|
end
|
88
88
|
|
89
|
+
opts.on("-i", "--interval SECONDS", String, "SECONDS between events, can be decimal eg 0.1 (10)") do |i|
|
90
|
+
options.interval = i.to_f
|
91
|
+
end
|
92
|
+
|
89
93
|
opts.on("-e", "--entity ENTITY", String, "ENTITY to generate failure events for ('foo-app-01')") do |e|
|
90
94
|
options.entity = e
|
91
95
|
end
|
@@ -101,6 +105,10 @@ optparse = OptionParser.new do |opts|
|
|
101
105
|
end
|
102
106
|
optparse.parse!(ARGV)
|
103
107
|
|
108
|
+
unless options.interval.to_f > 0
|
109
|
+
options.interval = 10.0
|
110
|
+
end
|
111
|
+
|
104
112
|
FLAPJACK_ENV = ENV['FLAPJACK_ENV'] || 'production'
|
105
113
|
|
106
114
|
config = Flapjack::Configuration.new
|
@@ -110,11 +118,13 @@ redis_options = config.for_redis
|
|
110
118
|
|
111
119
|
if config_env.nil? || config_env.empty?
|
112
120
|
puts "No config data for environment '#{FLAPJACK_ENV}' found in '#{options.config}'"
|
113
|
-
|
121
|
+
puts "\n#{optparse}"
|
122
|
+
exit 1
|
114
123
|
end
|
115
124
|
|
116
125
|
options = {:redis_options => redis_options, :minutes => options.minutes,
|
117
|
-
:entity => options.entity, :check => options.check, :state => options.state
|
126
|
+
:entity => options.entity, :check => options.check, :state => options.state,
|
127
|
+
:interval => options.interval}
|
118
128
|
case ARGV[0]
|
119
129
|
when "fail-and-recover"
|
120
130
|
fail(options.merge(:recover => true))
|
data/dist/etc/init.d/flapjack
CHANGED
@@ -1,22 +1,12 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
#
|
3
|
-
# Copyright (c) 2009-
|
3
|
+
# Copyright (c) 2009-2013 Lindsay Holmwood <lindsay@holmwood.id.au>
|
4
4
|
#
|
5
5
|
# flapjack
|
6
|
-
# Boots flapjack (coordinator,
|
6
|
+
# Boots flapjack (coordinator, processor, notifier, gateways...)
|
7
7
|
#
|
8
8
|
|
9
|
-
PATH
|
10
|
-
|
11
|
-
# load global rbenv environment if present
|
12
|
-
if [ -x /etc/profile.d/rbenv.sh ] ; then
|
13
|
-
source /etc/profile.d/rbenv.sh
|
14
|
-
fi
|
15
|
-
|
16
|
-
# Default return value
|
17
|
-
RETVAL=0
|
18
|
-
|
19
|
-
export FLAPJACK_ENV="production"
|
9
|
+
PATH=/opt/flapjack/bin:$PATH
|
20
10
|
|
21
11
|
if [ ! $(which flapjack) ]; then
|
22
12
|
echo "Error: flapjack isn't in PATH."
|
@@ -24,35 +14,8 @@ if [ ! $(which flapjack) ]; then
|
|
24
14
|
exit 1
|
25
15
|
fi
|
26
16
|
|
27
|
-
rbenv shell 1.9.3-p125
|
28
|
-
|
29
17
|
# Evaluate command
|
30
|
-
|
31
|
-
start)
|
32
|
-
flapjack start --config /etc/flapjack/flapjack-config.yaml --daemonize
|
33
|
-
RETVAL=$?
|
34
|
-
;;
|
35
|
-
stop)
|
36
|
-
flapjack stop --config /etc/flapjack/flapjack-config.yaml
|
37
|
-
RETVAL=$?
|
38
|
-
;;
|
39
|
-
restart)
|
40
|
-
flapjack restart --config /etc/flapjack/flapjack-config.yaml
|
41
|
-
RETVAL=$?
|
42
|
-
;;
|
43
|
-
reload)
|
44
|
-
flapjack reload --config /etc/flapjack/flapjack-config.yaml
|
45
|
-
RETVAL=$?
|
46
|
-
;;
|
47
|
-
status)
|
48
|
-
flapjack status --config /etc/flapjack/flapjack-config.yaml
|
49
|
-
RETVAL=$?
|
50
|
-
;;
|
51
|
-
*)
|
52
|
-
echo "Usage: flapjack {start|stop|restart|reload|status}"
|
53
|
-
RETVAL=1
|
54
|
-
;;
|
55
|
-
esac
|
18
|
+
flapjack $1
|
56
19
|
|
20
|
+
RETVAL=$?
|
57
21
|
exit $RETVAL
|
58
|
-
|
@@ -1,24 +1,12 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
#
|
3
|
-
# Copyright (c) 2009-
|
3
|
+
# Copyright (c) 2009-2013 Lindsay Holmwood <lindsay@holmwood.id.au>
|
4
4
|
#
|
5
5
|
# flapjack-nagios-receiver
|
6
6
|
# reads from a nagios perfdata named-pipe and submits each event to the events queue in redis
|
7
7
|
#
|
8
8
|
|
9
|
-
PATH
|
10
|
-
|
11
|
-
# load global rbenv environment if present
|
12
|
-
if [ -x /etc/profile.d/rbenv.sh ] ; then
|
13
|
-
source /etc/profile.d/rbenv.sh
|
14
|
-
fi
|
15
|
-
|
16
|
-
# Default return value
|
17
|
-
RETVAL=0
|
18
|
-
|
19
|
-
export FLAPJACK_ENV="production"
|
20
|
-
|
21
|
-
NAGIOS_PERFDATA_FIFO="/var/cache/nagios3/event_stream.fifo"
|
9
|
+
PATH=/opt/flapjack/bin:$PATH
|
22
10
|
|
23
11
|
if [ ! $(which flapjack-nagios-receiver) ]; then
|
24
12
|
echo "Error: flapjack-nagios-receiver isn't in PATH."
|
@@ -27,9 +15,7 @@ if [ ! $(which flapjack-nagios-receiver) ]; then
|
|
27
15
|
fi
|
28
16
|
|
29
17
|
# Evaluate command
|
30
|
-
|
31
|
-
rbenv shell 1.9.3-p125 && flapjack-nagios-receiver $1 --config /etc/flapjack/flapjack-config.yaml --fifo ${NAGIOS_PERFDATA_FIFO} --daemonize
|
18
|
+
flapjack-nagios-receiver $1
|
32
19
|
|
33
20
|
RETVAL=$?
|
34
21
|
exit $RETVAL
|
35
|
-
|
data/dist/etc/init.d/flapper
CHANGED
@@ -3,15 +3,7 @@
|
|
3
3
|
# flapper
|
4
4
|
#
|
5
5
|
|
6
|
-
PATH
|
7
|
-
|
8
|
-
# load global rbenv environment if present
|
9
|
-
if [ -x /etc/profile.d/rbenv.sh ] ; then
|
10
|
-
source /etc/profile.d/rbenv.sh
|
11
|
-
fi
|
12
|
-
|
13
|
-
# Default return value
|
14
|
-
RETVAL=0
|
6
|
+
PATH=/opt/flapjack/bin:$PATH
|
15
7
|
|
16
8
|
if [ ! $(which flapper) ]; then
|
17
9
|
echo "Error: flapper isn't in PATH."
|
@@ -20,8 +12,7 @@ if [ ! $(which flapper) ]; then
|
|
20
12
|
fi
|
21
13
|
|
22
14
|
# Evaluate command
|
23
|
-
|
24
|
-
RETVAL=$?
|
15
|
+
flapper $1
|
25
16
|
|
17
|
+
RETVAL=$?
|
26
18
|
exit $RETVAL
|
27
|
-
|
@@ -4,6 +4,9 @@ production:
|
|
4
4
|
pid_file: /var/run/flapjack/flapjack.pid
|
5
5
|
log_file: /var/log/flapjack/flapjack.log
|
6
6
|
daemonize: yes
|
7
|
+
logger:
|
8
|
+
level: INFO
|
9
|
+
syslog_errors: yes
|
7
10
|
redis:
|
8
11
|
host: 127.0.0.1
|
9
12
|
port: 6379
|
@@ -17,6 +20,7 @@ production:
|
|
17
20
|
new_check_scheduled_maintenance_duration: 100 years
|
18
21
|
logger:
|
19
22
|
level: INFO
|
23
|
+
syslog_errors: yes
|
20
24
|
notifier:
|
21
25
|
enabled: yes
|
22
26
|
queue: notifications
|
@@ -28,12 +32,18 @@ production:
|
|
28
32
|
default_contact_timezone: UTC
|
29
33
|
logger:
|
30
34
|
level: INFO
|
35
|
+
syslog_errors: yes
|
36
|
+
nagios-receiver:
|
37
|
+
fifo: "/var/cache/nagios3/event_stream.fifo"
|
38
|
+
pid_file: "/var/run/flapjack/flapjack-nagios-receiver.pid"
|
39
|
+
log_file: "/var/log/flapjack/flapjack-nagios-receiver.log"
|
31
40
|
gateways:
|
32
41
|
email:
|
33
42
|
enabled: no
|
34
43
|
queue: email_notifications
|
35
44
|
logger:
|
36
45
|
level: INFO
|
46
|
+
syslog_errors: yes
|
37
47
|
smtp_config:
|
38
48
|
# port 1025 is the default port for http://mailcatcher.me
|
39
49
|
host: 127.0.0.1
|
@@ -51,41 +61,27 @@ production:
|
|
51
61
|
password: "xxxx"
|
52
62
|
logger:
|
53
63
|
level: INFO
|
64
|
+
syslog_errors: yes
|
54
65
|
jabber:
|
55
66
|
enabled: no
|
56
67
|
queue: jabber_notifications
|
57
|
-
server: "jabber.
|
68
|
+
server: "jabber.example.com"
|
58
69
|
port: 5222
|
59
|
-
jabberid: "flapjack@jabber.
|
70
|
+
jabberid: "flapjack@jabber.example.com"
|
60
71
|
password: "good-password"
|
61
72
|
alias: "flapjack"
|
62
73
|
rooms:
|
63
|
-
- "gimp@conference.jabber.
|
64
|
-
- "log@conference.jabber.
|
65
|
-
logger:
|
66
|
-
level: INFO
|
67
|
-
oobetet:
|
68
|
-
enabled: no
|
69
|
-
server: "jabber.domain.tld"
|
70
|
-
port: 5222
|
71
|
-
jabberid: "flapjacktest@jabber.domain.tld"
|
72
|
-
password: "nuther-good-password"
|
73
|
-
alias: "flapjacktest"
|
74
|
-
watched_check: "PING"
|
75
|
-
watched_entity: "foo.bar.net"
|
76
|
-
max_latency: 300
|
77
|
-
pagerduty_contact: "11111111111111111111111111111111"
|
78
|
-
rooms:
|
79
|
-
- "flapjacktest@conference.jabber.domain.tld"
|
80
|
-
- "gimp@conference.jabber.domain.tld"
|
81
|
-
- "log@conference.jabber.domain.tld"
|
74
|
+
- "gimp@conference.jabber.example.com"
|
75
|
+
- "log@conference.jabber.example.com"
|
82
76
|
logger:
|
83
77
|
level: INFO
|
78
|
+
syslog_errors: yes
|
84
79
|
pagerduty:
|
85
80
|
enabled: no
|
86
81
|
queue: pagerduty_notifications
|
87
82
|
logger:
|
88
83
|
level: INFO
|
84
|
+
syslog_errors: yes
|
89
85
|
web:
|
90
86
|
enabled: yes
|
91
87
|
port: 3080
|
@@ -93,6 +89,7 @@ production:
|
|
93
89
|
access_log: "/var/log/flapjack/web_access.log"
|
94
90
|
logger:
|
95
91
|
level: INFO
|
92
|
+
syslog_errors: yes
|
96
93
|
api:
|
97
94
|
enabled: yes
|
98
95
|
port: 3081
|
@@ -100,11 +97,33 @@ production:
|
|
100
97
|
access_log: "/var/log/flapjack/api_access.log"
|
101
98
|
logger:
|
102
99
|
level: INFO
|
100
|
+
syslog_errors: yes
|
101
|
+
oobetet:
|
102
|
+
enabled: no
|
103
|
+
server: "jabber.example.com"
|
104
|
+
port: 5222
|
105
|
+
jabberid: "flapjacktest@jabber.example.com"
|
106
|
+
password: "nuther-good-password"
|
107
|
+
alias: "flapjacktest"
|
108
|
+
watched_check: "PING"
|
109
|
+
watched_entity: "foo.example.com"
|
110
|
+
max_latency: 300
|
111
|
+
pagerduty_contact: "11111111111111111111111111111111"
|
112
|
+
rooms:
|
113
|
+
- "flapjacktest@conference.jabber.example.com"
|
114
|
+
- "gimp@conference.jabber.example.com"
|
115
|
+
- "log@conference.jabber.example.com"
|
116
|
+
logger:
|
117
|
+
level: INFO
|
118
|
+
syslog_errors: yes
|
103
119
|
|
104
120
|
development:
|
105
121
|
pid_file: tmp/pids/flapjack.pid
|
106
122
|
log_file: log/flapjack.log
|
107
123
|
daemonize: yes
|
124
|
+
logger:
|
125
|
+
level: INFO
|
126
|
+
syslog_errors: yes
|
108
127
|
redis:
|
109
128
|
host: 127.0.0.1
|
110
129
|
port: 6379
|
@@ -118,6 +137,7 @@ development:
|
|
118
137
|
new_check_scheduled_maintenance_duration: 100 years
|
119
138
|
logger:
|
120
139
|
level: DEBUG
|
140
|
+
syslog_errors: yes
|
121
141
|
notifier:
|
122
142
|
enabled: yes
|
123
143
|
queue: notifications
|
@@ -129,12 +149,18 @@ development:
|
|
129
149
|
default_contact_timezone: UTC
|
130
150
|
logger:
|
131
151
|
level: DEBUG
|
152
|
+
syslog_errors: yes
|
153
|
+
nagios-receiver:
|
154
|
+
fifo: "/usr/local/var/lib/nagios/event_stream.fifo"
|
155
|
+
pid_file: "tmp/pids/flapjack-nagios-receiver.pid"
|
156
|
+
log_file: "log/flapjack-nagios-receiver.log"
|
132
157
|
gateways:
|
133
158
|
email:
|
134
|
-
enabled:
|
159
|
+
enabled: yes
|
135
160
|
queue: email_notifications
|
136
161
|
logger:
|
137
162
|
level: INFO
|
163
|
+
syslog_errors: yes
|
138
164
|
smtp_config:
|
139
165
|
# port 1025 is the default port for http://mailcatcher.me
|
140
166
|
host: 127.0.0.1
|
@@ -145,48 +171,36 @@ development:
|
|
145
171
|
# username:
|
146
172
|
# password:
|
147
173
|
sms:
|
148
|
-
enabled:
|
174
|
+
enabled: yes
|
149
175
|
queue: sms_notifications
|
150
|
-
|
151
|
-
|
176
|
+
# if you run up something like 200ok locally you can then view the
|
177
|
+
# sms messages being emitted
|
178
|
+
endpoint: 'http://localhost:9292/FakeMessagenetAPI.aspx'
|
179
|
+
username: "gretta"
|
152
180
|
password: "xxxx"
|
153
181
|
logger:
|
154
182
|
level: INFO
|
183
|
+
syslog_errors: yes
|
155
184
|
jabber:
|
156
185
|
enabled: no
|
157
186
|
queue: jabber_notifications
|
158
|
-
server: "jabber.
|
187
|
+
server: "jabber.example.com"
|
159
188
|
port: 5222
|
160
|
-
jabberid: "flapjack@jabber.
|
161
|
-
password: "
|
189
|
+
jabberid: "flapjack@jabber.example.com"
|
190
|
+
password: "xxxx"
|
162
191
|
alias: "flapjack"
|
163
192
|
rooms:
|
164
|
-
- "gimp@conference.jabber.
|
165
|
-
- "log@conference.jabber.
|
166
|
-
logger:
|
167
|
-
level: INFO
|
168
|
-
oobetet:
|
169
|
-
enabled: no
|
170
|
-
server: "jabber.domain.tld"
|
171
|
-
port: 5222
|
172
|
-
jabberid: "flapjacktest@jabber.domain.tld"
|
173
|
-
password: "nuther-good-password"
|
174
|
-
alias: "flapjacktest"
|
175
|
-
watched_check: "PING"
|
176
|
-
watched_entity: "foo.bar.net"
|
177
|
-
max_latency: 300
|
178
|
-
pagerduty_contact: "11111111111111111111111111111111"
|
179
|
-
rooms:
|
180
|
-
- "flapjacktest@conference.jabber.domain.tld"
|
181
|
-
- "gimp@conference.jabber.domain.tld"
|
182
|
-
- "log@conference.jabber.domain.tld"
|
193
|
+
- "gimp@conference.jabber.example.com"
|
194
|
+
- "log@conference.jabber.example.com"
|
183
195
|
logger:
|
184
196
|
level: INFO
|
197
|
+
syslog_errors: yes
|
185
198
|
pagerduty:
|
186
199
|
enabled: no
|
187
200
|
queue: pagerduty_notifications
|
188
201
|
logger:
|
189
202
|
level: INFO
|
203
|
+
syslog_errors: yes
|
190
204
|
web:
|
191
205
|
enabled: yes
|
192
206
|
port: 4080
|
@@ -194,6 +208,7 @@ development:
|
|
194
208
|
access_log: "log/web_access.log"
|
195
209
|
logger:
|
196
210
|
level: INFO
|
211
|
+
syslog_errors: yes
|
197
212
|
api:
|
198
213
|
enabled: yes
|
199
214
|
port: 4081
|
@@ -201,13 +216,27 @@ development:
|
|
201
216
|
access_log: "log/api_access.log"
|
202
217
|
logger:
|
203
218
|
level: INFO
|
204
|
-
|
219
|
+
syslog_errors: yes
|
220
|
+
oobetet:
|
221
|
+
enabled: no
|
222
|
+
server: "jabber.example.com"
|
223
|
+
port: 5222
|
224
|
+
jabberid: "flapjacktest@jabber.example.com"
|
225
|
+
password: "nuther-good-password"
|
226
|
+
alias: "flapjacktest"
|
227
|
+
watched_check: "PING"
|
228
|
+
watched_entity: "foo.example.com"
|
229
|
+
max_latency: 300
|
230
|
+
pagerduty_contact: "11111111111111111111111111111111"
|
231
|
+
rooms:
|
232
|
+
- "flapjacktest@conference.jabber.example.com"
|
233
|
+
- "gimp@conference.jabber.example.com"
|
234
|
+
- "log@conference.jabber.example.com"
|
235
|
+
logger:
|
236
|
+
level: INFO
|
237
|
+
syslog_errors: yes
|
205
238
|
|
206
239
|
test:
|
207
240
|
redis:
|
208
241
|
database: 14
|
209
242
|
|
210
|
-
staging:
|
211
|
-
redis:
|
212
|
-
database: 15
|
213
|
-
|