flapjack 1.0.0rc3 → 1.0.0rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -2
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +20 -0
  5. data/CONTRIBUTING.md +2 -2
  6. data/Gemfile +1 -1
  7. data/README.md +6 -16
  8. data/build.sh +13 -1
  9. data/etc/flapjack_config.yaml.example +98 -12
  10. data/features/cli.feature +8 -8
  11. data/features/cli_flapjack-nagios-receiver.feature +29 -37
  12. data/features/cli_flapper.feature +24 -12
  13. data/features/cli_simulate-failed-check.feature +2 -2
  14. data/features/notifications.feature +18 -1
  15. data/features/steps/cli_steps.rb +2 -2
  16. data/features/steps/notifications_steps.rb +71 -0
  17. data/features/support/env.rb +7 -6
  18. data/flapjack.gemspec +3 -1
  19. data/lib/flapjack/cli/flapper.rb +74 -25
  20. data/lib/flapjack/cli/import.rb +3 -4
  21. data/lib/flapjack/cli/maintenance.rb +182 -0
  22. data/lib/flapjack/cli/receiver.rb +110 -121
  23. data/lib/flapjack/cli/server.rb +30 -26
  24. data/lib/flapjack/cli/simulate.rb +2 -3
  25. data/lib/flapjack/data/contact.rb +1 -1
  26. data/lib/flapjack/data/entity.rb +425 -32
  27. data/lib/flapjack/data/entity_check.rb +212 -14
  28. data/lib/flapjack/data/event.rb +1 -1
  29. data/lib/flapjack/gateways/aws_sns.rb +134 -0
  30. data/lib/flapjack/gateways/aws_sns/alert.text.erb +5 -0
  31. data/lib/flapjack/gateways/aws_sns/rollup.text.erb +2 -0
  32. data/lib/flapjack/gateways/jabber.rb +2 -2
  33. data/lib/flapjack/gateways/jsonapi/check_methods.rb +1 -1
  34. data/lib/flapjack/gateways/jsonapi/contact_methods.rb +1 -1
  35. data/lib/flapjack/gateways/jsonapi/entity_methods.rb +15 -1
  36. data/lib/flapjack/gateways/jsonapi/metrics_methods.rb +4 -3
  37. data/lib/flapjack/gateways/jsonapi/report_methods.rb +1 -1
  38. data/lib/flapjack/gateways/web.rb +35 -16
  39. data/lib/flapjack/gateways/web/public/css/tablesort.css +0 -16
  40. data/lib/flapjack/gateways/web/public/js/backbone.jsonapi.js +1 -1
  41. data/lib/flapjack/gateways/web/public/js/jquery.tablesorter.widgets.js +0 -45
  42. data/lib/flapjack/gateways/web/public/js/modules/contact.js +2 -2
  43. data/lib/flapjack/gateways/web/public/js/modules/entity.js +2 -2
  44. data/lib/flapjack/gateways/web/public/js/modules/medium.js +4 -4
  45. data/lib/flapjack/gateways/web/public/js/self_stats.js +1 -1
  46. data/lib/flapjack/gateways/web/views/check.html.erb +10 -10
  47. data/lib/flapjack/gateways/web/views/checks.html.erb +1 -1
  48. data/lib/flapjack/gateways/web/views/contact.html.erb +5 -1
  49. data/lib/flapjack/gateways/web/views/edit_contacts.html.erb +3 -4
  50. data/lib/flapjack/gateways/web/views/entities.html.erb +1 -1
  51. data/lib/flapjack/gateways/web/views/index.html.erb +2 -2
  52. data/lib/flapjack/gateways/web/views/layout.erb +3 -3
  53. data/lib/flapjack/gateways/web/views/self_stats.html.erb +5 -6
  54. data/lib/flapjack/notifier.rb +4 -1
  55. data/lib/flapjack/patches.rb +8 -2
  56. data/lib/flapjack/pikelet.rb +3 -1
  57. data/lib/flapjack/version.rb +1 -1
  58. data/libexec/httpbroker.go +1 -1
  59. data/spec/lib/flapjack/coordinator_spec.rb +3 -3
  60. data/spec/lib/flapjack/data/contact_spec.rb +2 -2
  61. data/spec/lib/flapjack/data/entity_check_spec.rb +805 -53
  62. data/spec/lib/flapjack/data/entity_spec.rb +661 -0
  63. data/spec/lib/flapjack/gateways/aws_sns_spec.rb +123 -0
  64. data/spec/lib/flapjack/gateways/jabber_spec.rb +1 -1
  65. data/spec/lib/flapjack/gateways/jsonapi/check_methods_spec.rb +1 -1
  66. data/spec/lib/flapjack/gateways/jsonapi/entity_methods_spec.rb +2 -2
  67. data/spec/lib/flapjack/gateways/pagerduty_spec.rb +1 -1
  68. data/spec/lib/flapjack/gateways/web_spec.rb +11 -11
  69. data/spec/support/profile_all_formatter.rb +10 -10
  70. data/spec/support/uncolored_doc_formatter.rb +66 -4
  71. data/src/flapjack/event.go +1 -1
  72. data/tasks/benchmarks.rake +24 -20
  73. data/tasks/entities.rake +148 -0
  74. data/tmp/dummy_contacts.json +43 -0
  75. data/tmp/dummy_entities.json +37 -1
  76. metadata +43 -7
  77. data/tmp/test_entities.json +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d91c5e561fafc64a7698f898d1c02b6f00386c97
4
- data.tar.gz: c7c4e4ba3e84c4a59ff09964fc67278c12b2fb04
3
+ metadata.gz: c120d5918cc99ade12d514f7e749575473d9ba2b
4
+ data.tar.gz: ea16941a668662bf037e43e83a657d47a11b444a
5
5
  SHA512:
6
- metadata.gz: 6efd501448115a5a97a23df6ece95b2f53bf2b4a01d4fe268c1ae851bdb850aaa5d242497f2c5e4871f5b945076151081ae7df33b6eb15fe6e01f06d99a8cda0
7
- data.tar.gz: d11a32ab75ad2cbcf7b9f9d432cd6f5dfd2da498b127a2c653291f55cf08b7f7eafbc9da9894510b94bbde7d9edcc5ac9ede703761c612563d5e32b2851dabad
6
+ metadata.gz: af27ce434e61d18e20efef7343524280267bb9c6b9c1fd75cb983757a5e6f8e0d16ff4a8337d70764617e8ec00c3b03a13033ebc86aa1cb7a0fb8eb06a2d3216
7
+ data.tar.gz: 0f5c37e9cd734d705e96440b0e742df38f3e28e3d18a57a4104deba38feab58fcd555dad6e33428c1bdf2bf0e850c910f2f7e275ee1d10eb13c2473c8b925a7e
data/.gitignore CHANGED
@@ -25,10 +25,9 @@ tmp/spec*
25
25
  tmp/profiles
26
26
  flapjack-*.gem
27
27
  _site/*
28
- .rbenv-version
29
- .ruby-version
30
28
  .rvmrc
31
29
  artifacts/*
30
+ libexec/httpchecker*
32
31
  libexec/httpbroker
33
32
  libexec/httpbroker.linux_386
34
33
  libexec/httpbroker.linux_amd64
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](https://raw.github.com/flapjack/flapjack/gh-pages/images/flapjack-2013-notext-transparent-50-50.png "Flapjack") 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](https://github.com/flapjack/flapjack/wiki/DEVELOPING) section of the Flapjack wiki.
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
@@ -7,7 +7,7 @@ group :development do
7
7
  end
8
8
 
9
9
  group :test do
10
- gem 'rspec', '~> 3.0.0.beta1'
10
+ gem 'rspec', '~> 3.0'
11
11
  gem 'cucumber'
12
12
  gem 'delorean'
13
13
  gem 'rack-test'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ![Flapjack](https://raw.github.com/flapjack/flapjack/gh-pages/images/flapjack-2013-notext-transparent-50-50.png "Flapjack") 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](https://github.com/flapjack/flapjack/wiki/USING#wiki-configuring_components) section on the wiki for more details.
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](https://github.com/flapjack/flapjack/wiki/USING) section of the Flapjack wiki
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](https://github.com/flapjack/flapjack/wiki/DEVELOPING) section of the Flapjack wiki
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](https://github.com/flapjack/flapjack/wiki) has even more goodies:
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
- pid_file: /var/run/flapjack/flapjack.pid
5
- log_file: /var/log/flapjack/flapjack.log
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
- pid_file: "/var/run/flapjack/flapjack-nagios-receiver.pid"
41
- log_file: "/var/log/flapjack/flapjack-nagios-receiver.log"
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
- pid_file: "/var/run/flapjack/flapjack-nsca-receiver.pid"
45
- log_file: "/var/log/flapjack/flapjack-nsca-receiver.log"
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
- pid_file: tmp/pids/flapjack.pid
154
- log_file: log/flapjack.log
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
- pid_file: "tmp/pids/flapjack-nagios-receiver.pid"
190
- log_file: "log/flapjack-nagios-receiver.log"
245
+ pid_dir: "tmp/pids/"
246
+ log_dir: "log/"
191
247
  nsca-receiver:
192
248
  fifo: "/var/lib/nagios3/rw/nagios.cmd"
193
- pid_file: "/var/run/flapjack/flapjack-nsca-receiver.pid"
194
- log_file: "/var/log/flapjack/flapjack-nsca-receiver.log"
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