sensu-extensions-occurrences 1.0.0 → 1.1.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: e15818a78d87722c31cb29beddc1c7d61ab0b1a2
4
- data.tar.gz: 4f6064fa7b503cb6c2a426c429fef139a3b89c9e
3
+ metadata.gz: addf7ce37db1c6d2e09fbe1161f43cf7a1293d7c
4
+ data.tar.gz: c5399fe89faf53b136500a6761e72fc4082e0314
5
5
  SHA512:
6
- metadata.gz: 2511f18976ad8a63f050d13ba216002824bf9b59bf9799ff29038dedb5a660f42d44d1f816a1461a3aaa84edff60d8c316ce500f10ee0c893e6db79386d1f5aa
7
- data.tar.gz: bd2a4ddda648b662b7a23504230fe4ac84c63dc5feb6f065e3a3d1efa7170a6648716393e8b2bcd4f56a2a944b905fc84c8b63ba3274ef2a64b43903ed648519
6
+ metadata.gz: 91555d8459b42af3a09e84b5f8a7ec467132567084df53e234797664257d2448a753725825fb17630d2e2f29506c337a87ad89ac5eabe2a655314553b29fd833
7
+ data.tar.gz: fbe5188326733067c6057cfb61137b8aa0af5b2edaee5b9485eb5dbeef4a97b30d3bf0aa7ca7335752dcb35304d064fd774fd6083d97bde66cb93c62d097cc41
@@ -23,7 +23,9 @@ module Sensu
23
23
  check = event[:check]
24
24
  occurrences = check[:occurrences] || 1
25
25
  refresh = check[:refresh] || 1800
26
- if occurrences.is_a?(Integer) && refresh.is_a?(Integer)
26
+ if event[:action] == :resolve && event[:occurrences_watermark] >= occurrences
27
+ return ["enough occurrences", 1]
28
+ elsif occurrences.is_a?(Integer) && refresh.is_a?(Integer)
27
29
  if event[:occurrences] < occurrences
28
30
  return ["not enough occurrences", 0]
29
31
  end
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: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Extensions and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-27 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-extension