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 +4 -4
- data/lib/sensu/extensions/occurrences.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: addf7ce37db1c6d2e09fbe1161f43cf7a1293d7c
|
4
|
+
data.tar.gz: c5399fe89faf53b136500a6761e72fc4082e0314
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-extension
|