sensu 0.28.5 → 0.28.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/server/process.rb +11 -4
- 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: a1ea1cfa413a927a75a9acdbfb0a6ab81c7d8b9f
|
4
|
+
data.tar.gz: fd3e79ae3331d1128f69d4830e1cd42e17535ddd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 230f849a14b5f777a9a022b8282dc438098f468e36bd0b0b016393927945244b6e30374a9e2362223bf6bded7692ac826380f836a04f3f77bf6997ec8ee6e9ef
|
7
|
+
data.tar.gz: fed7831e688c6d1743f99bbba2cfa30daa719b8dfd2c3f5ba82890d9b61a995a0a4f6db09fdf81f0fc249eb28a1bf3cc989557cb98584447a4349987cf2a5c31
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/server/process.rb
CHANGED
@@ -429,11 +429,18 @@ module Sensu
|
|
429
429
|
# @return [TrueClass, FalseClass]
|
430
430
|
def check_flapping?(stored_event, check)
|
431
431
|
if check.has_key?(:low_flap_threshold) && check.has_key?(:high_flap_threshold)
|
432
|
-
|
433
|
-
|
434
|
-
|
432
|
+
if check[:low_flap_threshold].is_a?(Integer) && check[:high_flap_threshold].is_a?(Integer)
|
433
|
+
was_flapping = stored_event && stored_event[:action] == EVENT_FLAPPING_ACTION
|
434
|
+
if was_flapping
|
435
|
+
check[:total_state_change] > check[:low_flap_threshold]
|
436
|
+
else
|
437
|
+
check[:total_state_change] >= check[:high_flap_threshold]
|
438
|
+
end
|
435
439
|
else
|
436
|
-
check
|
440
|
+
details = {:check => check}
|
441
|
+
details[:client] = stored_event[:client] if stored_event
|
442
|
+
@logger.error("invalid check flap thresholds", details)
|
443
|
+
false
|
437
444
|
end
|
438
445
|
else
|
439
446
|
false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|