flapjack 0.6.38 → 0.6.39

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -12,6 +12,9 @@ FLAPJACK_ENV = ENV["FLAPJACK_ENV"] || 'test'
12
12
  require 'bundler'
13
13
  Bundler.require(:default, :test)
14
14
 
15
+ require 'webmock/rspec'
16
+ WebMock.disable_net_connect!
17
+
15
18
  $:.unshift(File.dirname(__FILE__) + '/../lib')
16
19
 
17
20
  # Requires supporting files with custom matchers and macros, etc,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flapjack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.38
4
+ version: 0.6.39
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-10-09 00:00:00.000000000 Z
14
+ date: 2012-10-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: daemons
@@ -285,22 +285,6 @@ dependencies:
285
285
  - - ! '>='
286
286
  - !ruby/object:Gem::Version
287
287
  version: '0'
288
- - !ruby/object:Gem::Dependency
289
- name: httparty
290
- requirement: !ruby/object:Gem::Requirement
291
- none: false
292
- requirements:
293
- - - ! '>='
294
- - !ruby/object:Gem::Version
295
- version: '0'
296
- type: :runtime
297
- prerelease: false
298
- version_requirements: !ruby/object:Gem::Requirement
299
- none: false
300
- requirements:
301
- - - ! '>='
302
- - !ruby/object:Gem::Version
303
- version: '0'
304
288
  - !ruby/object:Gem::Dependency
305
289
  name: rake
306
290
  requirement: !ruby/object:Gem::Requirement
@@ -317,22 +301,6 @@ dependencies:
317
301
  - - ! '>='
318
302
  - !ruby/object:Gem::Version
319
303
  version: '0'
320
- - !ruby/object:Gem::Dependency
321
- name: colorize
322
- requirement: !ruby/object:Gem::Requirement
323
- none: false
324
- requirements:
325
- - - ! '>='
326
- - !ruby/object:Gem::Version
327
- version: '0'
328
- type: :development
329
- prerelease: false
330
- version_requirements: !ruby/object:Gem::Requirement
331
- none: false
332
- requirements:
333
- - - ! '>='
334
- - !ruby/object:Gem::Version
335
- version: '0'
336
304
  description: Flapjack is distributed monitoring notification system that provides
337
305
  a scalable method for processing streams of events from Nagios and deciding who
338
306
  should be notified
@@ -350,6 +318,7 @@ extensions: []
350
318
  extra_rdoc_files: []
351
319
  files:
352
320
  - .gitignore
321
+ - .gitmodules
353
322
  - .rbenv-version
354
323
  - .rspec
355
324
  - .travis.yml
@@ -382,12 +351,6 @@ files:
382
351
  - dist/puppet/ruby/manifests/dev.pp
383
352
  - dist/puppet/ruby/manifests/rubygems.pp
384
353
  - dist/puppet/sqlite3/manifests/dev.pp
385
- - doc/CONFIGURING.md
386
- - doc/DEBUGGING.md
387
- - doc/DEVELOPING.md
388
- - doc/GLOSSARY.md
389
- - doc/INSTALL.md
390
- - doc/PACKAGING.md
391
354
  - etc/flapjack_config.yaml.example
392
355
  - features/events.feature
393
356
  - features/notifications.feature
@@ -416,6 +379,7 @@ files:
416
379
  - lib/flapjack/data/entity.rb
417
380
  - lib/flapjack/data/entity_check.rb
418
381
  - lib/flapjack/data/event.rb
382
+ - lib/flapjack/data/global.rb
419
383
  - lib/flapjack/executive.rb
420
384
  - lib/flapjack/filters/acknowledgement.rb
421
385
  - lib/flapjack/filters/base.rb
@@ -513,7 +477,10 @@ files:
513
477
  - spec/lib/flapjack/jabber_spec.rb
514
478
  - spec/lib/flapjack/notification/email_spec.rb
515
479
  - spec/lib/flapjack/notification/sms_spec.rb
480
+ - spec/lib/flapjack/oobetet_spec.rb
481
+ - spec/lib/flapjack/pagerduty_spec.rb
516
482
  - spec/lib/flapjack/pikelet_spec.rb
483
+ - spec/lib/flapjack/redis_pool_spec.rb
517
484
  - spec/lib/flapjack/web_spec.rb
518
485
  - spec/spec_helper.rb
519
486
  - spec/support/profile_all_formatter.rb
@@ -586,7 +553,10 @@ test_files:
586
553
  - spec/lib/flapjack/jabber_spec.rb
587
554
  - spec/lib/flapjack/notification/email_spec.rb
588
555
  - spec/lib/flapjack/notification/sms_spec.rb
556
+ - spec/lib/flapjack/oobetet_spec.rb
557
+ - spec/lib/flapjack/pagerduty_spec.rb
589
558
  - spec/lib/flapjack/pikelet_spec.rb
559
+ - spec/lib/flapjack/redis_pool_spec.rb
590
560
  - spec/lib/flapjack/web_spec.rb
591
561
  - spec/spec_helper.rb
592
562
  - spec/support/profile_all_formatter.rb
data/doc/CONFIGURING.md DELETED
@@ -1,38 +0,0 @@
1
- ### Configuring ###
2
-
3
- You can configure who receives notifications from `flapjack-notifier`
4
- in `/etc/flapjack/recipients.yaml`:
5
-
6
- ---
7
- - :name: Jane Doe
8
- :email: "jane@doe.com"
9
- :phone: "+61 444 222 111"
10
- :pager: "61444222111"
11
- :jid: "jane@doe.com"
12
-
13
- Then you can configure how people are notified in `/etc/flapjack/flapjack-notifier.yaml`:
14
-
15
- ---
16
- :notifiers:
17
- :mailer:
18
- :from_address: notifications@my-domain.com
19
- :xmpp:
20
- :jid: notifications@my-domain.com
21
- :password: foo
22
- :database_uri: "sqlite3:///var/lib/flapjack/flapjack.db"
23
-
24
- Currently there are email and XMPP notifiers.
25
-
26
- The `database_uri` setting must point to the database `flapjack-admin` backs
27
- onto. This can be SQLite3, MySQL, or PostgreSQL:
28
-
29
- :database_uri: "mysql://user:password@localhost/flapjack_production"
30
- # or
31
- :database_uri: "postgres://me:spoons@db.mydomain.com/flapjack_production"
32
-
33
- Now you need to restart the notifier:
34
-
35
- flapjack-notifier-manager restart --recipients /etc/flapjack/recipients.yaml \
36
- --config /etc/flapjack/flapjack-notifier.yaml
37
-
38
-
data/doc/DEBUGGING.md DELETED
@@ -1,28 +0,0 @@
1
- Here's some useful ways of debugging various things in Flapjack.
2
-
3
- Redis Connection Leaks
4
-
5
- The following command reports every five seconds the number of connections to redis (as reported by lsof) and the totall number of EM external protocol connections currently in place:
6
-
7
- production paths:
8
-
9
- while true ; do
10
- echo -n "EM connection count: "
11
- tail -50000 /var/log/flapjack/flapjack.log | grep -i "connection count" \
12
- | tail -1 | awk '{ print $5 }'
13
- echo -n "lsof redis: "
14
- sudo lsof -p `cat /var/run/flapjack/flapjack.pid` | grep :6379 | wc -l
15
- sleep 5
16
- done
17
-
18
- development paths:
19
-
20
- while true ; do
21
- echo -n "EM connection count: "
22
- tail -50000 log/flapjack.log | grep -i "connection count" \
23
- | tail -1 | awk '{ print $5 }'
24
- echo -n "lsof redis: "
25
- sudo lsof -p `cat tmp/pids/flapjack.pid` | grep localhost:6379 | wc -l
26
- sleep 5
27
- done
28
-
data/doc/DEVELOPING.md DELETED
@@ -1,35 +0,0 @@
1
- Developing
2
- ----------
3
-
4
- You can write your own notifiers and place them in `lib/flapjack/notifiers/`.
5
-
6
- Your notifier just needs to implement the `notify` method, and take in a hash:
7
-
8
- class Sms
9
- def initialize(opts={})
10
- # you may want to set from address here
11
- @from = (opts[:from] || "0431 112 233")
12
- end
13
-
14
- def notify(opts={})
15
- who = opts[:who]
16
- result = opts[:result]
17
- # sms to your hearts content
18
- end
19
- end
20
-
21
-
22
- Testing
23
- -------
24
-
25
- Flapjack is, and will continue to be, well tested. Monitoring is like continuous
26
- integration for production apps, so why shouldn't your monitoring system have tests?
27
-
28
- Testing is done with rspec, and tests live in `spec/`.
29
-
30
- To run the tests, check out the code and run:
31
-
32
- $ rake spec
33
-
34
-
35
-
data/doc/GLOSSARY.md DELETED
@@ -1,19 +0,0 @@
1
-
2
- As implemented for the reporting API functions, these are placeholder terms only and open for discussion.
3
-
4
- <dl>
5
- <dt>Entity</dt>
6
- <dd>TODO</dd>
7
- <dt>Check</dt>
8
- <dd>TODO</dd>
9
-
10
- <dt>Outage</dt>
11
- <dd>Period of time from when a check goes into the 'CRITICAL'
12
- state to when it comes out of that state again</dd>
13
- <dt>Scheduled maintenance</dt>
14
- <dd>Periods of time explicitly created by external actors to denote that maintenance is scheduled to occur at these times.</dd>
15
- <dt>Unscheduled maintenance</dt>
16
- <dd>Periods of time explicitly created by external actors to denote that maintenance is happening or has happened at these times</dd>
17
- <dt>Downtime</dt>
18
- <dd>Outages minus scheduled maintenances across any given time period</dd>
19
- </dl>
data/doc/INSTALL.md DELETED
@@ -1,64 +0,0 @@
1
- Dependencies
2
- ------------
3
-
4
- Before installing Flapjack you will need to setup some dependencies.
5
-
6
- ### Setup dependencies (Ubuntu Hardy) ###
7
-
8
- Add the following lines to `/etc/apt/sources.list`
9
-
10
- deb http://ppa.launchpad.net/ubuntu-ruby-backports/ubuntu hardy main
11
- deb http://ppa.launchpad.net/auxesis/ppa/ubuntu hardy main
12
-
13
- Add GPG keys for the repos:
14
-
15
- sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 288BA53BCB7DA731
16
-
17
- Update your package list:
18
-
19
- sudo apt-get update
20
-
21
- Install Ruby dependencies:
22
-
23
- sudo apt-get install build-essential libsqlite3-dev
24
-
25
- Install rubygems + beanstalkd:
26
-
27
- sudo apt-get install rubygems beanstalkd
28
-
29
- Set `ENABLED=1` in `/etc/default/beanstalkd`.
30
-
31
- Start beanstalkd:
32
-
33
- sudo /etc/init.d/beanstalkd start
34
-
35
-
36
- ### Setup dependencies (everyone else) ###
37
-
38
- Install the following software through your package manager or from source:
39
-
40
- - beanstalkd (from [http://xph.us/software/beanstalkd/](http://xph.us/software/beanstalkd/))
41
- - libevent (from [http://monkey.org/~provos/libevent/](http://monkey.org/~provos/libevent/))
42
- - latest RubyGems (from [http://rubyforge.org/projects/rubygems/](http://rubyforge.org/projects/rubygems/))
43
-
44
-
45
- ## Installation ##
46
-
47
- Add GitHub's RubyGems server to your Gem sources:
48
-
49
- sudo gem sources -a http://gems.github.com
50
-
51
- Install the Flapjack gem:
52
-
53
- sudo gem install auxesis-flapjack
54
-
55
- Then run the magic configuration script to set up init scripts:
56
-
57
- sudo install-flapjack-systemwide
58
-
59
- The script will prompt you if it wants to do anything destructive.
60
-
61
- ## Packages ##
62
-
63
- We want to provide native packages for Flapjack (`.deb`, `.rpm`, `.ebuild`). If
64
- you'd like to contribute please let us know!
data/doc/PACKAGING.md DELETED
@@ -1,25 +0,0 @@
1
- Debian / Ubuntu
2
- ===============
3
-
4
- Packaged dependencies:
5
-
6
- * libdaemons-ruby
7
- * liblog4r-ruby
8
- * libxmpp4r-ruby
9
- * libtmail-ruby
10
-
11
- Unpackaged dependencies:
12
-
13
- * beanstalkd-client (libbeanstalkd-ruby)
14
- * dm-core
15
- * dm-timestamps
16
- * dm-types
17
- * dm-validations
18
- * data_objects
19
- * do_sqlite3
20
- * do_mysql
21
-
22
- The unpackaged dependencies need to be packaged to make Flapjack packagable.
23
-
24
- Current development efforts are working towards abstracting the
25
- DataMapper/DataObjects dependency so packaging isn't a complete travesty.