sensu-extensions-occurrences 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efca1b4530797c34ca1d7bd601a7ac27dc02aeee
4
- data.tar.gz: 953cc6eccc46a002820020bc451f3d6867dd6ef5
3
+ metadata.gz: e15818a78d87722c31cb29beddc1c7d61ab0b1a2
4
+ data.tar.gz: 4f6064fa7b503cb6c2a426c429fef139a3b89c9e
5
5
  SHA512:
6
- metadata.gz: 59c859ac33e3368a45a786a2e025b63280472a584623e17397ded8807796794b6e7acf0d50f0e76d1c4ca242fca0b21e6187c0b2258678e693ab3fdaffa3193a
7
- data.tar.gz: 722aae756c62093b673e79e8acb56ec1126ac522209ce3504f453086d60071ef1bc54f3efbbdcd2ceebf20f5774baf355373433b55726979df6ae2aa2c3c4c25
6
+ metadata.gz: 2511f18976ad8a63f050d13ba216002824bf9b59bf9799ff29038dedb5a660f42d44d1f816a1461a3aaa84edff60d8c316ce500f10ee0c893e6db79386d1f5aa
7
+ data.tar.gz: bd2a4ddda648b662b7a23504230fe4ac84c63dc5feb6f065e3a3d1efa7170a6648716393e8b2bcd4f56a2a944b905fc84c8b63ba3274ef2a64b43903ed648519
@@ -0,0 +1,26 @@
1
+ # Change Log
2
+
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/).
6
+
7
+ ## [1.0.0] - 2016-07-27
8
+
9
+ ### Added
10
+
11
+ - Added a LICENSE, CHANGELOG, (from
12
+ [sensu-extensions/template](https://github.com/sensu-extensions/template)).
13
+
14
+ ### Changed
15
+
16
+ - Updated gemspec and README to better represent a desired Sensu extension
17
+ repository.
18
+
19
+ ## 0.0.1 - 2016-07-21
20
+
21
+ ### Added
22
+
23
+ - Initial release.
24
+
25
+ [Unreleased]: https://github.com/sensu-extensions/sensu-extensions-occurrences/compare/v1.0.0...HEAD
26
+ [1.0.0]: https://github.com/sensu-extensions/sensu-extensions-occurrences/compare/v0.0.1...v1.0.0
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2016 Sensu-Extensions
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,36 +1,73 @@
1
- # Sensu::Extensions::Only::Check::Output
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sensu/extensions/only/check/output`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'sensu-extensions-only-check-output'
1
+ # Sensu::Extensions::Occurrences
2
+
3
+ This filter extension provides the Sensu Core built-in filter
4
+ `occurrences`.
5
+
6
+ This filter provides the functionality that will soon be removed from
7
+ the sensu-plugin handler library. Cameron Johnston wrote a great blog
8
+ post on this topic, [Deprecating Event Filtering in
9
+ sensu-plugin](https://sensuapp.org/blog/2016/07/07/sensu-plugin-filter-deprecation.html).
10
+
11
+ The `occurrences` filter will determine if an event occurrence count
12
+ meets the user defined requirements in the event check definition.
13
+ Users can specify a minimum number of `occurrences` before an event
14
+ will be passed to a handler. Users can also specify a `refresh` time,
15
+ in seconds, to reset where recurrences are counted from.
16
+
17
+ ## Configuration
18
+
19
+ The `occurrences` filter is included in every install of Sensu. To
20
+ apply the filter to handler, use the `"filter"` or `"filters"` handler
21
+ definition attribute.
22
+
23
+ For example:
24
+
25
+ ``` json
26
+ {
27
+ "handlers": {
28
+ "email": {
29
+ "...": "...",
30
+ "filter": "occurrences"
31
+ }
32
+ }
33
+ }
13
34
  ```
14
35
 
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install sensu-extensions-only-check-output
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sensu-extensions-only-check-output.
36
+ or
37
+
38
+ ``` json
39
+ {
40
+ "handlers": {
41
+ "email": {
42
+ "...": "...",
43
+ "filters": ["occurrences"]
44
+ }
45
+ }
46
+ }
47
+ ```
36
48
 
49
+ The `occurrences` filter uses two custom check definition attributes,
50
+ `occurrences`, and `refresh`.
51
+
52
+ `occurrences`: The number of event occurrences that must occur before
53
+ an event is handled for the check (default is `1`).
54
+
55
+ `refresh`: Time in seconds until the event occurrence count is
56
+ considered reset for the purpose of counting occurrences, to allow an
57
+ event for the check to be handled again (default is `1800`). For
58
+ example, a check with a `refresh` of 1800 will have its events
59
+ (recurrences) handled every 30 minutes, to remind users of the issue.
60
+
61
+ For example:
62
+
63
+ ``` json
64
+ {
65
+ "checks": {
66
+ "check-http": {
67
+ "...": "...",
68
+ "occurrences": 2,
69
+ "refresh": 3600
70
+ }
71
+ }
72
+ }
73
+ ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-extensions-occurrences
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Sean Porter
7
+ - Sensu-Extensions and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-21 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-extension
@@ -94,19 +94,17 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description: The Sensu Core built-in occurrences files
97
+ description: The Sensu Core built-in occurrences filter
98
98
  email:
99
- - portertech@gmail.com
99
+ - "<sensu-users@googlegroups.com>"
100
100
  executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - Gemfile
105
- - Gemfile.lock
104
+ - CHANGELOG.md
105
+ - LICENSE
106
106
  - README.md
107
- - Rakefile
108
107
  - lib/sensu/extensions/occurrences.rb
109
- - sensu-extensions-occurrences.gemspec
110
108
  homepage: https://github.com/sensu-extensions/sensu-extensions-occurrences
111
109
  licenses: []
112
110
  metadata: {}
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in sensu-extensions-only-check-output.gemspec
4
- gemspec
@@ -1,49 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sensu-extensions-occurrences (0.0.1)
5
- sensu-extension
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- diff-lcs (1.2.5)
11
- eventmachine (1.2.0.1)
12
- oj (2.14.6)
13
- rake (10.5.0)
14
- rspec (3.4.0)
15
- rspec-core (~> 3.4.0)
16
- rspec-expectations (~> 3.4.0)
17
- rspec-mocks (~> 3.4.0)
18
- rspec-core (3.4.4)
19
- rspec-support (~> 3.4.0)
20
- rspec-expectations (3.4.0)
21
- diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.4.0)
23
- rspec-mocks (3.4.1)
24
- diff-lcs (>= 1.2.0, < 2.0)
25
- rspec-support (~> 3.4.0)
26
- rspec-support (3.4.1)
27
- sensu-extension (1.5.0)
28
- eventmachine
29
- sensu-json (2.0.0)
30
- oj (= 2.14.6)
31
- sensu-logger (1.2.0)
32
- eventmachine
33
- sensu-json
34
- sensu-settings (6.0.0)
35
- sensu-json (>= 1.1.0)
36
-
37
- PLATFORMS
38
- ruby
39
-
40
- DEPENDENCIES
41
- bundler (~> 1.6)
42
- rake
43
- rspec
44
- sensu-extensions-occurrences!
45
- sensu-logger
46
- sensu-settings
47
-
48
- BUNDLED WITH
49
- 1.11.2
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "sensu-extensions-occurrences"
5
- spec.version = "0.0.1"
6
- spec.authors = ["Sean Porter"]
7
- spec.email = ["portertech@gmail.com"]
8
-
9
- spec.summary = "The Sensu Core built-in occurrences filter"
10
- spec.description = "The Sensu Core built-in occurrences files"
11
- spec.homepage = "https://github.com/sensu-extensions/sensu-extensions-occurrences"
12
-
13
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
14
- spec.require_paths = ["lib"]
15
-
16
- spec.add_dependency "sensu-extension"
17
-
18
- spec.add_development_dependency "bundler", "~> 1.6"
19
- spec.add_development_dependency "rake"
20
- spec.add_development_dependency "rspec"
21
- spec.add_development_dependency "sensu-logger"
22
- spec.add_development_dependency "sensu-settings"
23
- end