sensu 0.26.1 → 0.26.2

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: 66ab7c472c9b66a469abcc8847ef6577f4ca1576
4
- data.tar.gz: 4af5803bfa67bfb2bf208b199792e9b72af86190
3
+ metadata.gz: 49342309f09127069c61915d616297e647fa069a
4
+ data.tar.gz: bbb10e038647d660014b1fc8164d1194718313c0
5
5
  SHA512:
6
- metadata.gz: 78013ade42f67c4b9782fd7a9b2c67923146912b5af2648a878c478145c124c858ab190dd5d289fa09e732ce40d56f336be120014945c2ea832d825d2a9bf234
7
- data.tar.gz: 455c50d9fedb67eae71ca80923689e0ee8b5f801cf2b62a69b77400429e10b5dfe3f59829c1f5c5ed6fe43806169aff0db63e5551a5961a18cc10b65d9539deb
6
+ metadata.gz: baa7cd64f72f96dc80b9d36f15c227345d812601f7ec28cc03cfc53b898f0a8ca700e7c9fde46c2acb18e75ad0f68a5ce72eb5dd50a05719b4a004b2f3746fc5
7
+ data.tar.gz: 2ec35d738afa9ac97d9af1a3cbefbc9facc5617e5061906b6de716b86fc07053392f93313d6e69e828ab9f906f05b640d21f402f18ab61855664844f3125d5c5
@@ -1,3 +1,26 @@
1
+ ## 0.26.2 - 2016-09-20
2
+
3
+ ### Fixes
4
+
5
+ Added logic to ensure proxy clients receive a per-client subscription upon
6
+ creation so that they can be silenced via /silenced API.
7
+
8
+ Updated API publish_check_result helper to address a condition where
9
+ events could not be successfully deleted for clients configured with a
10
+ signature.
11
+
12
+ Fixed regexp in API which prevented retrieval of silence entries when
13
+ requesting subscriptions containing a colon (e.g. `client:foo`,
14
+ `roundrobin:bar`) on the `/silenced/subscriptions/:subscription` endpoint.
15
+
16
+ Fixed a condition where processing check results with an invalid signature
17
+ failed to complete. This often manifest as timeouts when waiting for
18
+ sensu-server processes to terminate.
19
+
20
+ ### Changes
21
+
22
+ Default value for `client` settings has changed from `nil` to `{}`.
23
+
1
24
  ## 0.26.1 - 2016-09-07
2
25
 
3
26
  ### Fixes
@@ -3,7 +3,7 @@ module Sensu
3
3
  module Routes
4
4
  module Silenced
5
5
  SILENCED_URI = /^\/silenced$/
6
- SILENCED_SUBSCRIPTION_URI = /^\/silenced\/subscriptions\/([\w\.-]+)$/
6
+ SILENCED_SUBSCRIPTION_URI = /^\/silenced\/subscriptions\/([\w\.-:]+)$/
7
7
  SILENCED_CHECK_URI = /^\/silenced\/checks\/([\w\.-]+)$/
8
8
  SILENCED_CLEAR_URI = /^\/silenced\/clear$/
9
9
 
@@ -20,13 +20,16 @@ module Sensu
20
20
  :client => client_name,
21
21
  :check => check
22
22
  }
23
- @logger.info("publishing check result", :payload => payload)
24
- @transport.publish(:direct, "results", Sensu::JSON.dump(payload)) do |info|
25
- if info[:error]
26
- @logger.error("failed to publish check result", {
27
- :payload => payload,
28
- :error => info[:error].to_s
29
- })
23
+ @redis.get("client:#{client_name}:signature") do |signature|
24
+ payload[:signature] = signature unless signature.nil?
25
+ @logger.info("publishing check result", :payload => payload)
26
+ @transport.publish(:direct, "results", Sensu::JSON.dump(payload)) do |info|
27
+ if info[:error]
28
+ @logger.error("failed to publish check result", {
29
+ :payload => payload,
30
+ :error => info[:error].to_s
31
+ })
32
+ end
30
33
  end
31
34
  end
32
35
  end
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  unless defined?(Sensu::VERSION)
3
3
  # Sensu release version.
4
- VERSION = "0.26.1".freeze
4
+ VERSION = "0.26.2".freeze
5
5
 
6
6
  # Sensu check severities.
7
7
  SEVERITIES = %w[ok warning critical unknown].freeze
@@ -4,7 +4,7 @@ gem "eventmachine", "1.2.0.1"
4
4
 
5
5
  gem "sensu-json", "2.0.0"
6
6
  gem "sensu-logger", "1.2.0"
7
- gem "sensu-settings", "9.1.1"
7
+ gem "sensu-settings", "9.2.0"
8
8
  gem "sensu-extension", "1.5.0"
9
9
  gem "sensu-extensions", "1.7.0"
10
10
  gem "sensu-transport", "6.0.0"
@@ -575,7 +575,7 @@ module Sensu
575
575
  {
576
576
  :name => name,
577
577
  :address => "unknown",
578
- :subscriptions => [],
578
+ :subscriptions => ["client:#{name}"],
579
579
  :keepalives => false,
580
580
  :version => VERSION
581
581
  }
@@ -606,6 +606,7 @@ module Sensu
606
606
  :client => client
607
607
  })
608
608
  @logger.warn("not retrieving client from the registry", :result => result)
609
+ yield(nil)
609
610
  end
610
611
  else
611
612
  yield(client)
@@ -645,23 +646,28 @@ module Sensu
645
646
  @in_progress[:check_results] += 1
646
647
  @logger.debug("processing result", :result => result)
647
648
  retrieve_client(result) do |client|
648
- check = case
649
- when @settings.check_exists?(result[:check][:name]) && !result[:check][:standalone]
650
- @settings[:checks][result[:check][:name]].merge(result[:check])
651
- else
652
- result[:check]
653
- end
654
- check[:type] ||= STANDARD_CHECK_TYPE
655
- check[:origin] = result[:client] if check[:source]
656
- aggregate_check_result(client, check) if check[:aggregates] || check[:aggregate]
657
- store_check_result(client, check) do
658
- create_event(client, check) do |event|
659
- event_bridges(event)
660
- update_event_registry(event) do |process|
661
- process_event(event) if process
662
- @in_progress[:check_results] -= 1
649
+ unless client.nil?
650
+ check = case
651
+ when @settings.check_exists?(result[:check][:name]) && !result[:check][:standalone]
652
+ @settings[:checks][result[:check][:name]].merge(result[:check])
653
+ else
654
+ result[:check]
655
+ end
656
+ check[:type] ||= STANDARD_CHECK_TYPE
657
+ check[:origin] = result[:client] if check[:source]
658
+ aggregate_check_result(client, check) if check[:aggregates] || check[:aggregate]
659
+ store_check_result(client, check) do
660
+ create_event(client, check) do |event|
661
+ event_bridges(event)
662
+ update_event_registry(event) do |process|
663
+ process_event(event) if process
664
+ @in_progress[:check_results] -= 1
665
+ end
663
666
  end
664
667
  end
668
+ else
669
+ @logger.warn("halting result processing", :result => result)
670
+ @in_progress[:check_results] -= 1
665
671
  end
666
672
  end
667
673
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency "eventmachine", "1.2.0.1"
16
16
  s.add_dependency "sensu-json", "2.0.0"
17
17
  s.add_dependency "sensu-logger", "1.2.0"
18
- s.add_dependency "sensu-settings", "9.1.1"
18
+ s.add_dependency "sensu-settings", "9.2.0"
19
19
  s.add_dependency "sensu-extension", "1.5.0"
20
20
  s.add_dependency "sensu-extensions", "1.7.0"
21
21
  s.add_dependency "sensu-transport", "6.0.0"
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.26.1
4
+ version: 0.26.2
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: 2016-09-07 00:00:00.000000000 Z
12
+ date: 2016-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - '='
61
61
  - !ruby/object:Gem::Version
62
- version: 9.1.1
62
+ version: 9.2.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: 9.1.1
69
+ version: 9.2.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: sensu-extension
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  version: '0'
281
281
  requirements: []
282
282
  rubyforge_project:
283
- rubygems_version: 2.6.3
283
+ rubygems_version: 2.6.6
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: A monitoring framework