flapjack 1.0.0rc3 → 1.0.0rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.ruby-version +1 -0
- data/CHANGELOG.md +20 -0
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +1 -1
- data/README.md +6 -16
- data/build.sh +13 -1
- data/etc/flapjack_config.yaml.example +98 -12
- data/features/cli.feature +8 -8
- data/features/cli_flapjack-nagios-receiver.feature +29 -37
- data/features/cli_flapper.feature +24 -12
- data/features/cli_simulate-failed-check.feature +2 -2
- data/features/notifications.feature +18 -1
- data/features/steps/cli_steps.rb +2 -2
- data/features/steps/notifications_steps.rb +71 -0
- data/features/support/env.rb +7 -6
- data/flapjack.gemspec +3 -1
- data/lib/flapjack/cli/flapper.rb +74 -25
- data/lib/flapjack/cli/import.rb +3 -4
- data/lib/flapjack/cli/maintenance.rb +182 -0
- data/lib/flapjack/cli/receiver.rb +110 -121
- data/lib/flapjack/cli/server.rb +30 -26
- data/lib/flapjack/cli/simulate.rb +2 -3
- data/lib/flapjack/data/contact.rb +1 -1
- data/lib/flapjack/data/entity.rb +425 -32
- data/lib/flapjack/data/entity_check.rb +212 -14
- data/lib/flapjack/data/event.rb +1 -1
- data/lib/flapjack/gateways/aws_sns.rb +134 -0
- data/lib/flapjack/gateways/aws_sns/alert.text.erb +5 -0
- data/lib/flapjack/gateways/aws_sns/rollup.text.erb +2 -0
- data/lib/flapjack/gateways/jabber.rb +2 -2
- data/lib/flapjack/gateways/jsonapi/check_methods.rb +1 -1
- data/lib/flapjack/gateways/jsonapi/contact_methods.rb +1 -1
- data/lib/flapjack/gateways/jsonapi/entity_methods.rb +15 -1
- data/lib/flapjack/gateways/jsonapi/metrics_methods.rb +4 -3
- data/lib/flapjack/gateways/jsonapi/report_methods.rb +1 -1
- data/lib/flapjack/gateways/web.rb +35 -16
- data/lib/flapjack/gateways/web/public/css/tablesort.css +0 -16
- data/lib/flapjack/gateways/web/public/js/backbone.jsonapi.js +1 -1
- data/lib/flapjack/gateways/web/public/js/jquery.tablesorter.widgets.js +0 -45
- data/lib/flapjack/gateways/web/public/js/modules/contact.js +2 -2
- data/lib/flapjack/gateways/web/public/js/modules/entity.js +2 -2
- data/lib/flapjack/gateways/web/public/js/modules/medium.js +4 -4
- data/lib/flapjack/gateways/web/public/js/self_stats.js +1 -1
- data/lib/flapjack/gateways/web/views/check.html.erb +10 -10
- data/lib/flapjack/gateways/web/views/checks.html.erb +1 -1
- data/lib/flapjack/gateways/web/views/contact.html.erb +5 -1
- data/lib/flapjack/gateways/web/views/edit_contacts.html.erb +3 -4
- data/lib/flapjack/gateways/web/views/entities.html.erb +1 -1
- data/lib/flapjack/gateways/web/views/index.html.erb +2 -2
- data/lib/flapjack/gateways/web/views/layout.erb +3 -3
- data/lib/flapjack/gateways/web/views/self_stats.html.erb +5 -6
- data/lib/flapjack/notifier.rb +4 -1
- data/lib/flapjack/patches.rb +8 -2
- data/lib/flapjack/pikelet.rb +3 -1
- data/lib/flapjack/version.rb +1 -1
- data/libexec/httpbroker.go +1 -1
- data/spec/lib/flapjack/coordinator_spec.rb +3 -3
- data/spec/lib/flapjack/data/contact_spec.rb +2 -2
- data/spec/lib/flapjack/data/entity_check_spec.rb +805 -53
- data/spec/lib/flapjack/data/entity_spec.rb +661 -0
- data/spec/lib/flapjack/gateways/aws_sns_spec.rb +123 -0
- data/spec/lib/flapjack/gateways/jabber_spec.rb +1 -1
- data/spec/lib/flapjack/gateways/jsonapi/check_methods_spec.rb +1 -1
- data/spec/lib/flapjack/gateways/jsonapi/entity_methods_spec.rb +2 -2
- data/spec/lib/flapjack/gateways/pagerduty_spec.rb +1 -1
- data/spec/lib/flapjack/gateways/web_spec.rb +11 -11
- data/spec/support/profile_all_formatter.rb +10 -10
- data/spec/support/uncolored_doc_formatter.rb +66 -4
- data/src/flapjack/event.go +1 -1
- data/tasks/benchmarks.rake +24 -20
- data/tasks/entities.rake +148 -0
- data/tmp/dummy_contacts.json +43 -0
- data/tmp/dummy_entities.json +37 -1
- metadata +43 -7
- data/tmp/test_entities.json +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c120d5918cc99ade12d514f7e749575473d9ba2b
|
4
|
+
data.tar.gz: ea16941a668662bf037e43e83a657d47a11b444a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af27ce434e61d18e20efef7343524280267bb9c6b9c1fd75cb983757a5e6f8e0d16ff4a8337d70764617e8ec00c3b03a13033ebc86aa1cb7a0fb8eb06a2d3216
|
7
|
+
data.tar.gz: 0f5c37e9cd734d705e96440b0e742df38f3e28e3d18a57a4104deba38feab58fcd555dad6e33428c1bdf2bf0e850c910f2f7e275ee1d10eb13c2473c8b925a7e
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
## Flapjack Changelog
|
2
2
|
|
3
|
+
# 1.0.0rc5 - 2014-08-20
|
4
|
+
- Bug: Fix fatal web UI errors #611 (@jessereynolds)
|
5
|
+
- Bug: use same base time for Chronic, time comparison #615 (@ali-graham)
|
6
|
+
- Feature: Add more ids for capybara testing #617 (@Hobbsee)
|
7
|
+
|
8
|
+
# 1.0.0rc4 - 2014-08-19
|
9
|
+
- Feature: Add maintenance to the CLI #597 (@Hobbsee)
|
10
|
+
- Feature: Always show the search bar #604 (@Hobbsee)
|
11
|
+
- Feature: Allow custom Flapjack branding #505 (@ferrisoxide)
|
12
|
+
- Feature: Rename state with entity, and reparent orphaned entity data #600 (@ali-graham)
|
13
|
+
- Feature: Added AWS SNS Notification Gateway #602 (@clarkf)
|
14
|
+
- Feature: httpchecker binary from pandik project #601 (@michaelneale)
|
15
|
+
- Feature: Add id labels to media boxes to make testing easier #610 (@Hobbsee)
|
16
|
+
- Bug: gli 2.11 incompatability #585 (@jessereynolds)
|
17
|
+
- Bug: web ui: editing contacts doesn't work with included example config #588 (@jessereynolds)
|
18
|
+
- Bug: Add return code if the end unscheduled maintenance was successful #596 (@Hobbsee)
|
19
|
+
- Bug: Pid fixes, handle exit codes correctly with GLI #603 (@Hobbsee)
|
20
|
+
- Bug: PID and consistency fixes #606 (@Hobbsee)
|
21
|
+
- Chore: Fix links to refer to our new flapjack documentation #590 (@Hobbsee)
|
22
|
+
|
3
23
|
# 1.0.0rc3 - 2014-07-24
|
4
24
|
- Bug: fix jsonapi methods for report checks/methods, maintenance reports, outage reports (@ali-graham)
|
5
25
|
- Bug: improve tests around notification rules and rollup, tweak rollup behaviour on recovery (@ali-graham)
|
data/CONTRIBUTING.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#Contributing to ![Flapjack](
|
1
|
+
#Contributing to ![Flapjack](http:////flapjack.io/images/flapjack-2013-notext-transparent-50-50.png "Flapjack") Flapjack
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/flapjack/flapjack.png)](https://travis-ci.org/flapjack/flapjack)
|
4
4
|
|
5
|
-
Please see the [Contributing to Flapjack](
|
5
|
+
Please see the [Contributing to Flapjack](http://flapjack.io/docs/1.0/development/DEVELOPING) section of the Flapjack wiki.
|
6
6
|
|
7
7
|
> Flapjack is, and will continue to be, well tested. Monitoring is like continuous integration for production apps, so why shouldn't your monitoring system have tests?
|
8
8
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ![Flapjack](
|
1
|
+
# ![Flapjack](http://flapjack.io/images/flapjack-2013-notext-transparent-50-50.png "Flapjack") Flapjack
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/flapjack/flapjack.png)](https://travis-ci.org/flapjack/flapjack)
|
4
4
|
|
@@ -25,7 +25,7 @@ Flapjack provides a scalable method for dealing with events representing changes
|
|
25
25
|
|
26
26
|
At its core, Flapjack processes events received from external check execution engines, such as Nagios. Nagios provides a 'perfdata' event output channel, which writes to a named pipe. `flapjack-nagios-receiver` then reads from this named pipe, converts each line to JSON and adds them to the events queue.
|
27
27
|
|
28
|
-
Flapjack sits downstream of check execution engines (like Nagios, Sensu, Icinga, or cron), processing events to determine:
|
28
|
+
Flapjack sits downstream of check execution engines (like Nagios, Sensu, Icinga, or cron), processing events to determine:
|
29
29
|
|
30
30
|
* if a problem has been detected
|
31
31
|
* who should know about the problem
|
@@ -81,7 +81,7 @@ You'll also need Redis >= 2.6.12.
|
|
81
81
|
|
82
82
|
## Configuring
|
83
83
|
|
84
|
-
Have a look at the default config file and modify things as required. See the [Configuring Components](
|
84
|
+
Have a look at the default config file and modify things as required. See the [Configuring Components](http://flapjack.io/docs/1.0/usage/USING#wiki-configuring_components) section on the wiki for more details.
|
85
85
|
|
86
86
|
``` bash
|
87
87
|
# hack the config
|
@@ -128,11 +128,11 @@ sudo /etc/init.d/flapjack start
|
|
128
128
|
|
129
129
|
## Using - Details
|
130
130
|
|
131
|
-
For more information, including full specification of the configuration file and the data import formats, please refer to the [USING](
|
131
|
+
For more information, including full specification of the configuration file and the data import formats, please refer to the [USING](http://flapjack.io/docs/1.0/usage/USING) section of the Flapjack wiki
|
132
132
|
|
133
133
|
## Developing Flapjack
|
134
134
|
|
135
|
-
Information on developing more Flapjack components or contributing to core Flapjack development can be found in the [DEVELOPING](
|
135
|
+
Information on developing more Flapjack components or contributing to core Flapjack development can be found in the [DEVELOPING](http://flapjack.io/docs/1.0/developing/DEVELOPING) section of the Flapjack wiki
|
136
136
|
|
137
137
|
## Documentation Submodule
|
138
138
|
|
@@ -151,14 +151,4 @@ If you make changes to the documentation locally, here's how to publish them:
|
|
151
151
|
|
152
152
|
## More on the wiki
|
153
153
|
|
154
|
-
[The Flapjack wiki](
|
155
|
-
|
156
|
-
- [Using Flapjack](https://github.com/flapjack/flapjack/wiki/USING)
|
157
|
-
- [Developing Flapjack](https://github.com/flapjack/flapjack/wiki/DEVELOPING)
|
158
|
-
- [Redis Data Structure](https://github.com/flapjack/flapjack/wiki/DATA_STRUCTURES)
|
159
|
-
- [API](https://github.com/flapjack/flapjack/wiki/API)
|
160
|
-
- [Importing](https://github.com/flapjack/flapjack/wiki/IMPORTING)
|
161
|
-
- [Debugging Flapjack](https://github.com/flapjack/flapjack/wiki/DEBUGGING)
|
162
|
-
- [Flapjack Glossary](https://github.com/flapjack/flapjack/wiki/GLOSSARY)
|
163
|
-
|
164
|
-
|
154
|
+
[The Flapjack wiki](http://flapjack.io/docs/1.0/wiki/) has even more goodies
|
data/build.sh
CHANGED
@@ -7,6 +7,8 @@ export GOPATH=$(pwd):$GOPATH
|
|
7
7
|
go get github.com/garyburd/redigo/redis
|
8
8
|
go get github.com/go-martini/martini
|
9
9
|
go get gopkg.in/alecthomas/kingpin.v1
|
10
|
+
go get github.com/oguzbilgic/pandik
|
11
|
+
mv bin/pandik libexec/httpchecker
|
10
12
|
|
11
13
|
go test flapjack
|
12
14
|
|
@@ -18,5 +20,15 @@ if [ ! -z "$CROSSCOMPILE" ]; then
|
|
18
20
|
for command in httpbroker oneoff; do
|
19
21
|
GOOS=linux GOARCH=amd64 CGOENABLED=0 go build -x -o libexec/$command.linux_amd64 libexec/$command.go
|
20
22
|
GOOS=linux GOARCH=386 CGOENABLED=0 go build -x -o libexec/$command.linux_386 libexec/$command.go
|
21
|
-
done
|
23
|
+
done
|
24
|
+
|
25
|
+
pushd src/github.com/oguzbilgic/pandik
|
26
|
+
GOOS=linux GOARCH=amd64 CGOENABLED=0 go build -x -o httpchecker.linux_amd64
|
27
|
+
GOOS=linux GOARCH=386 CGOENABLED=0 go build -x -o httpchecker.linux_386
|
28
|
+
popd
|
29
|
+
mv src/github.com/oguzbilgic/pandik/httpchecker.linux_amd64 libexec/httpchecker.linux_amd64
|
30
|
+
mv src/github.com/oguzbilgic/pandik/httpchecker.linux_386 libexec/httpchecker.linux_386
|
31
|
+
|
22
32
|
fi
|
33
|
+
|
34
|
+
|
@@ -1,8 +1,8 @@
|
|
1
1
|
---
|
2
2
|
|
3
3
|
production:
|
4
|
-
|
5
|
-
|
4
|
+
pid_dir: /var/run/flapjack/
|
5
|
+
log_dir: /var/log/flapjack/
|
6
6
|
daemonize: yes
|
7
7
|
logger:
|
8
8
|
level: INFO
|
@@ -11,23 +11,35 @@ production:
|
|
11
11
|
host: 127.0.0.1
|
12
12
|
port: 6380
|
13
13
|
db: 0
|
14
|
+
# Processes monitoring events off the *events* queue (a redis list) and decides
|
15
|
+
# what actions to take (generate notification event, record state changes, etc)
|
14
16
|
processor:
|
15
17
|
enabled: yes
|
16
18
|
queue: events
|
17
19
|
notifier_queue: notifications
|
18
20
|
archive_events: true
|
19
21
|
events_archive_maxage: 10800
|
22
|
+
# Flapjack sets scheduled maintenance on new check results so contacts aren't
|
23
|
+
# notified as soon as Flapjack becomes aware of an entity to notify on.
|
24
|
+
# This is useful is cases where your monitoring starts checking something
|
25
|
+
# before it is completely provisioned
|
26
|
+
# Value parsed by https://github.com/hpoydar/chronic_duration
|
27
|
+
# You can disable this setting by specifying 0 seconds.
|
20
28
|
new_check_scheduled_maintenance_duration: 100 years
|
21
29
|
new_check_scheduled_maintenance_ignore_tags:
|
22
30
|
- bypass_ncsm
|
23
31
|
logger:
|
24
32
|
level: INFO
|
25
33
|
syslog_errors: yes
|
34
|
+
# Processes notification events off the *notifications* queue (a redis list) and
|
35
|
+
# works out who to notify, and on which media, and with what kind of notification
|
36
|
+
# message. It then creates jobs for the various notification gateways below.
|
26
37
|
notifier:
|
27
38
|
enabled: yes
|
28
39
|
queue: notifications
|
29
40
|
email_queue: email_notifications
|
30
41
|
sms_queue: sms_notifications
|
42
|
+
sns_queue: sns_notifications
|
31
43
|
jabber_queue: jabber_notifications
|
32
44
|
pagerduty_queue: pagerduty_notifications
|
33
45
|
notification_log_file: /var/log/flapjack/notification.log
|
@@ -37,19 +49,23 @@ production:
|
|
37
49
|
syslog_errors: yes
|
38
50
|
nagios-receiver:
|
39
51
|
fifo: "/var/cache/nagios3/event_stream.fifo"
|
40
|
-
|
41
|
-
|
52
|
+
pid_dir: "/var/run/flapjack/"
|
53
|
+
log_dir: "/var/log/flapjack/"
|
42
54
|
nsca-receiver:
|
43
55
|
fifo: "/var/lib/nagios3/rw/nagios.cmd"
|
44
|
-
|
45
|
-
|
56
|
+
pid_dir: "/var/run/flapjack/"
|
57
|
+
log_dir: "/var/log/flapjack/"
|
46
58
|
gateways:
|
59
|
+
# Generates email notifications
|
47
60
|
email:
|
48
61
|
enabled: no
|
62
|
+
# the redis queue this pikelet will look for notifications on
|
49
63
|
queue: email_notifications
|
50
64
|
logger:
|
51
65
|
level: INFO
|
52
66
|
syslog_errors: yes
|
67
|
+
# these values are passed directly through to EventMachine::Protocols::SmtpClient configuration,
|
68
|
+
# and can be omitted if the defaults are acceptable
|
53
69
|
smtp_config:
|
54
70
|
# from: "Flapjack Example <flapjack@noreply.example>"
|
55
71
|
# reply_to: "flapjack@support.example"
|
@@ -69,8 +85,10 @@ production:
|
|
69
85
|
# alert.text: '/etc/flapjack/templates/email/alert.text.erb'
|
70
86
|
# rollup.html: '/etc/flapjack/templates/email/rollup.html.erb'
|
71
87
|
# alert.html: '/etc/flapjack/templates/email/alert.html.erb'
|
88
|
+
# Generates sms notifications
|
72
89
|
sms:
|
73
90
|
enabled: no
|
91
|
+
# the redis queue this pikelet will look for notifications on
|
74
92
|
queue: sms_notifications
|
75
93
|
endpoint: 'https://www.messagenet.com.au/dotnet/Lodge.asmx/LodgeSMSMessage'
|
76
94
|
username: "ermahgerd"
|
@@ -82,16 +100,29 @@ production:
|
|
82
100
|
#templates:
|
83
101
|
# rollup.text: '/etc/flapjack/templates/sms/rollup.text.erb'
|
84
102
|
# alert.text: '/etc/flapjack/templates/sms/alert.text.erb'
|
103
|
+
# Generates SNS notifications
|
104
|
+
sns:
|
105
|
+
enabled: no
|
106
|
+
queue: sns_notifications
|
107
|
+
#region_name: us-east-1
|
108
|
+
# Don't forget to use an IAM user's credentials here so revocation is easy!
|
109
|
+
access_key: AKIAIOSFODNN7EXAMPLE
|
110
|
+
secret_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
111
|
+
# Connects to an XMPP (jabber) server, sends notifications (to rooms and individuals),
|
112
|
+
# handles acknowledgements from jabber users and other commands.
|
85
113
|
jabber:
|
86
114
|
enabled: no
|
115
|
+
# the redis queue this pikelet will look for notifications on
|
87
116
|
queue: jabber_notifications
|
88
117
|
server: "jabber.example.com"
|
89
118
|
port: 5222
|
90
119
|
jabberid: "flapjack@jabber.example.com"
|
91
120
|
password: "good-password"
|
92
121
|
alias: "flapjack"
|
122
|
+
# List of strings that this pikelet user will respond to
|
93
123
|
identifiers:
|
94
124
|
- "@flapjack"
|
125
|
+
# the Multi-User Chats the pikelet should join and announce to
|
95
126
|
rooms:
|
96
127
|
- "gimp@conference.jabber.example.com"
|
97
128
|
- "log@conference.jabber.example.com"
|
@@ -102,8 +133,11 @@ production:
|
|
102
133
|
#templates:
|
103
134
|
# rollup.text: '/etc/flapjack/templates/jabber/rollup.text.erb'
|
104
135
|
# alert.text: '/etc/flapjack/templates/jabber/alert.text.erb'
|
136
|
+
# Sends notifications to and accepts acknowledgements from [PagerDuty](http://www.pagerduty.com/)
|
137
|
+
# (NB: contacts will need to have a registered PagerDuty account to use this)
|
105
138
|
pagerduty:
|
106
139
|
enabled: no
|
140
|
+
# the redis queue this pikelet will look for notifications on
|
107
141
|
queue: pagerduty_notifications
|
108
142
|
logger:
|
109
143
|
level: INFO
|
@@ -111,16 +145,19 @@ production:
|
|
111
145
|
# location of custom alert templates
|
112
146
|
#templates:
|
113
147
|
# alert.text: '/etc/flapjack/templates/pagerduty/alert.text.erb'
|
148
|
+
# Browsable web interface
|
114
149
|
web:
|
115
150
|
enabled: yes
|
116
151
|
port: 3080
|
117
152
|
timeout: 300
|
118
153
|
access_log: "/var/log/flapjack/web_access.log"
|
119
154
|
api_url: "http://localhost:3081/"
|
155
|
+
# Full path to location of logo file, e.g. /etc/flapjack/custom_logo.png
|
120
156
|
#logo_image_path: "/etc/flapjack/web/custom_logo/flapjack-2013-notext-transparent-300-300.png"
|
121
157
|
logger:
|
122
158
|
level: INFO
|
123
159
|
syslog_errors: yes
|
160
|
+
# HTTP API server
|
124
161
|
jsonapi:
|
125
162
|
enabled: yes
|
126
163
|
port: 3081
|
@@ -130,17 +167,25 @@ production:
|
|
130
167
|
logger:
|
131
168
|
level: INFO
|
132
169
|
syslog_errors: yes
|
170
|
+
# "out-of-band" end-to-end testing, used for monitoring other instances of
|
171
|
+
# flapjack to ensure that they are running correctly
|
133
172
|
oobetet:
|
134
173
|
enabled: no
|
135
174
|
server: "jabber.example.com"
|
136
175
|
port: 5222
|
176
|
+
# jabberid, password, alias, rooms: see the jabber pikelet
|
137
177
|
jabberid: "flapjacktest@jabber.example.com"
|
138
178
|
password: "nuther-good-password"
|
139
179
|
alias: "flapjacktest"
|
180
|
+
# The check oobetet should watch for the state change
|
140
181
|
watched_check: "PING"
|
182
|
+
# The entitiy that the check should be associated with
|
141
183
|
watched_entity: "foo.example.com"
|
184
|
+
# The maximum amount of time allowed to pass between state changes on that check
|
142
185
|
max_latency: 300
|
186
|
+
# The API key for a service in PagerDuty that the oobetet will use to alert you
|
143
187
|
pagerduty_contact: "11111111111111111111111111111111"
|
188
|
+
# Jabber rooms to join
|
144
189
|
rooms:
|
145
190
|
- "flapjacktest@conference.jabber.example.com"
|
146
191
|
- "gimp@conference.jabber.example.com"
|
@@ -150,8 +195,8 @@ production:
|
|
150
195
|
syslog_errors: yes
|
151
196
|
|
152
197
|
development:
|
153
|
-
|
154
|
-
|
198
|
+
pid_dir: tmp/pids/
|
199
|
+
log_dir: log/
|
155
200
|
daemonize: yes
|
156
201
|
logger:
|
157
202
|
level: DEBUG
|
@@ -160,18 +205,29 @@ development:
|
|
160
205
|
host: 127.0.0.1
|
161
206
|
port: 6379
|
162
207
|
db: 13
|
208
|
+
# Processes monitoring events off the *events* queue (a redis list) and decides
|
209
|
+
# what actions to take (generate notification event, record state changes, etc)
|
163
210
|
processor:
|
164
211
|
enabled: yes
|
165
212
|
queue: events
|
166
213
|
notifier_queue: notifications
|
167
214
|
archive_events: true
|
168
215
|
events_archive_maxage: 10800
|
216
|
+
# Flapjack sets scheduled maintenance on new check results so contacts aren't
|
217
|
+
# notified as soon as Flapjack becomes aware of an entity to notify on.
|
218
|
+
# This is useful is cases where your monitoring starts checking something
|
219
|
+
# before it is completely provisioned
|
220
|
+
# Value parsed by https://github.com/hpoydar/chronic_duration
|
221
|
+
# You can disable this setting by specifying 0 seconds.
|
169
222
|
new_check_scheduled_maintenance_duration: 100 years
|
170
223
|
new_check_scheduled_maintenance_ignore_tags:
|
171
224
|
- bypass_ncsm
|
172
225
|
logger:
|
173
226
|
level: DEBUG
|
174
227
|
syslog_errors: yes
|
228
|
+
# Processes notification events off the *notifications* queue (a redis list) and
|
229
|
+
# works out who to notify, and on which media, and with what kind of notification
|
230
|
+
# message. It then creates jobs for the various notification gateways below.
|
175
231
|
notifier:
|
176
232
|
enabled: yes
|
177
233
|
queue: notifications
|
@@ -186,19 +242,23 @@ development:
|
|
186
242
|
syslog_errors: yes
|
187
243
|
nagios-receiver:
|
188
244
|
fifo: "/var/cache/nagios3/event_stream.fifo"
|
189
|
-
|
190
|
-
|
245
|
+
pid_dir: "tmp/pids/"
|
246
|
+
log_dir: "log/"
|
191
247
|
nsca-receiver:
|
192
248
|
fifo: "/var/lib/nagios3/rw/nagios.cmd"
|
193
|
-
|
194
|
-
|
249
|
+
pid_dir: "tmp/pids/"
|
250
|
+
log_dir: "log/"
|
195
251
|
gateways:
|
252
|
+
# Generates email notifications
|
196
253
|
email:
|
197
254
|
enabled: no
|
255
|
+
# the redis queue this pikelet will look for notifications on
|
198
256
|
queue: email_notifications
|
199
257
|
logger:
|
200
258
|
level: DEBUG
|
201
259
|
syslog_errors: yes
|
260
|
+
# these values are passed directly through to EventMachine::Protocols::SmtpClient configuration,
|
261
|
+
# and can be omitted if the defaults are acceptable
|
202
262
|
smtp_config:
|
203
263
|
# from: "Flapjack Example <flapjack@noreply.example>"
|
204
264
|
# reply_to: "flapjack@support.example"
|
@@ -218,8 +278,10 @@ development:
|
|
218
278
|
# alert.text: '/etc/flapjack/templates/email/alert.text.erb'
|
219
279
|
# rollup.html: '/etc/flapjack/templates/email/rollup.html.erb'
|
220
280
|
# alert.html: '/etc/flapjack/templates/email/alert.html.erb'
|
281
|
+
# Generates sms notifications
|
221
282
|
sms:
|
222
283
|
enabled: no
|
284
|
+
# the redis queue this pikelet will look for notifications on
|
223
285
|
queue: sms_notifications
|
224
286
|
endpoint: 'https://www.messagenet.com.au/dotnet/Lodge.asmx/LodgeSMSMessage'
|
225
287
|
username: "ermahgerd"
|
@@ -231,14 +293,21 @@ development:
|
|
231
293
|
#templates:
|
232
294
|
# rollup.text: '/etc/flapjack/templates/sms/rollup.text.erb'
|
233
295
|
# alert.text: '/etc/flapjack/templates/sms/alert.text.erb'
|
296
|
+
# Connects to an XMPP (jabber) server, sends notifications (to rooms and individuals),
|
297
|
+
# handles acknowledgements from jabber users and other commands.
|
234
298
|
jabber:
|
235
299
|
enabled: no
|
300
|
+
# the redis queue this pikelet will look for notifications on
|
236
301
|
queue: jabber_notifications
|
237
302
|
server: "jabber.example.com"
|
238
303
|
port: 5222
|
239
304
|
jabberid: "flapjack@jabber.example.com"
|
240
305
|
password: "good-password"
|
241
306
|
alias: "flapjack"
|
307
|
+
# List of strings that this pikelet user will respond to
|
308
|
+
identifiers:
|
309
|
+
- "@flapjack"
|
310
|
+
# the Multi-User Chats the pikelet should join and announce to
|
242
311
|
rooms:
|
243
312
|
- "gimp@conference.jabber.example.com"
|
244
313
|
- "log@conference.jabber.example.com"
|
@@ -249,8 +318,11 @@ development:
|
|
249
318
|
#templates:
|
250
319
|
# rollup.text: '/etc/flapjack/templates/jabber/rollup.text.erb'
|
251
320
|
# alert.text: '/etc/flapjack/templates/jabber/alert.text.erb'
|
321
|
+
# Sends notifications to and accepts acknowledgements from [PagerDuty](http://www.pagerduty.com/)
|
322
|
+
# (NB: contacts will need to have a registered PagerDuty account to use this)
|
252
323
|
pagerduty:
|
253
324
|
enabled: no
|
325
|
+
# the redis queue this pikelet will look for notifications on
|
254
326
|
queue: pagerduty_notifications
|
255
327
|
logger:
|
256
328
|
level: INFO
|
@@ -258,16 +330,19 @@ development:
|
|
258
330
|
# location of custom alert templates
|
259
331
|
#templates:
|
260
332
|
# alert.text: '/etc/flapjack/templates/pagerduty/alert.text.erb'
|
333
|
+
# Browsable web interface
|
261
334
|
web:
|
262
335
|
enabled: yes
|
263
336
|
port: 3080
|
264
337
|
timeout: 300
|
265
338
|
access_log: "log/web_access.log"
|
266
339
|
api_url: "http://localhost:3081/"
|
340
|
+
# Full path to location of logo file, e.g. /etc/flapjack/custom_logo.png
|
267
341
|
#logo_image_path: "/etc/flapjack/web/custom_logo/flapjack-2013-notext-transparent-300-300.png"
|
268
342
|
logger:
|
269
343
|
level: DEBUG
|
270
344
|
syslog_errors: yes
|
345
|
+
# HTTP API server
|
271
346
|
jsonapi:
|
272
347
|
enabled: yes
|
273
348
|
port: 3081
|
@@ -277,17 +352,25 @@ development:
|
|
277
352
|
logger:
|
278
353
|
level: DEBUG
|
279
354
|
syslog_errors: yes
|
355
|
+
# "out-of-band" end-to-end testing, used for monitoring other instances of
|
356
|
+
# flapjack to ensure that they are running correctly
|
280
357
|
oobetet:
|
281
358
|
enabled: no
|
282
359
|
server: "jabber.example.com"
|
283
360
|
port: 5222
|
361
|
+
# jabberid, password, alias, rooms: see the jabber pikelet
|
284
362
|
jabberid: "flapjacktest@jabber.example.com"
|
285
363
|
password: "nuther-good-password"
|
286
364
|
alias: "flapjacktest"
|
365
|
+
# The check oobetet should watch for the state change
|
287
366
|
watched_check: "PING"
|
367
|
+
# The entitiy that the check should be associated with
|
288
368
|
watched_entity: "foo.example.com"
|
369
|
+
# The maximum amount of time allowed to pass between state changes on that check
|
289
370
|
max_latency: 300
|
371
|
+
# The API key for a service in PagerDuty that the oobetet will use to alert you
|
290
372
|
pagerduty_contact: "11111111111111111111111111111111"
|
373
|
+
# Jabber rooms to join
|
291
374
|
rooms:
|
292
375
|
- "flapjacktest@conference.jabber.example.com"
|
293
376
|
- "gimp@conference.jabber.example.com"
|
@@ -297,5 +380,8 @@ development:
|
|
297
380
|
syslog_errors: yes
|
298
381
|
|
299
382
|
test:
|
383
|
+
pid_dir: tmp/pids/
|
384
|
+
log_dir: log/
|
300
385
|
redis:
|
301
386
|
db: 14
|
387
|
+
driver: ruby
|