sensu 0.28.5 → 0.28.6

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: e8c11e41665106ee2bc0f82c86f592ada60c9e3f
4
- data.tar.gz: 8ea7ac9f55323c8169514efbe38ab615c79b1243
3
+ metadata.gz: a1ea1cfa413a927a75a9acdbfb0a6ab81c7d8b9f
4
+ data.tar.gz: fd3e79ae3331d1128f69d4830e1cd42e17535ddd
5
5
  SHA512:
6
- metadata.gz: 63cbaba4b312b0a171161fdfb3f498cfb2608e96bdd2f6057ee3030a8f37473199b094ebb9b58f0b208a10a4e2699db7ab123336cb5db39ea8825a91ce62efb7
7
- data.tar.gz: 18f1b4406bdcb565823699ec382ba50b60e65cfc524fc1df0f61af04c166e0950fb44f07a6a6b202bcea3b662171ad5c4c9dad0b9c3833b2be6f91b29d72e63d
6
+ metadata.gz: 230f849a14b5f777a9a022b8282dc438098f468e36bd0b0b016393927945244b6e30374a9e2362223bf6bded7692ac826380f836a04f3f77bf6997ec8ee6e9ef
7
+ data.tar.gz: fed7831e688c6d1743f99bbba2cfa30daa719b8dfd2c3f5ba82890d9b61a995a0a4f6db09fdf81f0fc249eb28a1bf3cc989557cb98584447a4349987cf2a5c31
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  unless defined?(Sensu::VERSION)
3
3
  # Sensu release version.
4
- VERSION = "0.28.5".freeze
4
+ VERSION = "0.28.6".freeze
5
5
 
6
6
  # Sensu check severities.
7
7
  SEVERITIES = %w[ok warning critical unknown].freeze
@@ -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
- was_flapping = stored_event && stored_event[:action] == EVENT_FLAPPING_ACTION
433
- if was_flapping
434
- check[:total_state_change] > check[:low_flap_threshold]
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[:total_state_change] >= check[:high_flap_threshold]
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.5
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-03-23 00:00:00.000000000 Z
12
+ date: 2017-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine