sensu 0.23.1 → 0.23.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8920f20efb15711f40bc5990a250b597ef6d2681
4
- data.tar.gz: b97b6638f52f723c9166855dfed740fd7edf6635
3
+ metadata.gz: 7e3611ec2f2e922acd3b702feca41b666eba0e9a
4
+ data.tar.gz: a04c0abf1fa00d3f4dcb0dc5b2fe11f1d472c35e
5
5
  SHA512:
6
- metadata.gz: c8ea0b5879bc89648d4f5ffa05437e90120e8cd43cb4f89267b3570514d1b199d86f3ff1bd4b042f8ddcaddae0449883374b29445f255c342ffc2945a830a3e0
7
- data.tar.gz: 10cd5dd9457e8fad1a5b77cdc8fc4f0cb5b567b7d2a2b5b25b6ca1c2a26f77b811c87b27cdaa2b9fb7b6a78dc116a494722c64aa8b444165435d3c3093f16590
6
+ metadata.gz: 3a4d2c30f39646de26d694251250464d1011ac9c4c8b8abd5770b0efe4818a61f2369dbe532c586608a46cb9a282b301413cfd3b82401c646bdd2f18c3be9da7
7
+ data.tar.gz: 720d2f4e990a38aed5296cba6f4e59b699b21e55d3b5cb4655841e3668ca9f7b36ea7768eb578a1cfab3e83c2fc7aea311db315872c68af9a957f5c4c88259e5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.23.2 - 2016-04-25
2
+
3
+ ### Fixes
4
+
5
+ Fixed client socket check result publishing when the client has a
6
+ signature. The client signature is now added to the check result payload,
7
+ making it valid.
8
+
9
+ ### Other
10
+
11
+ Added client socket check result check TTL validation.
12
+
1
13
  ## 0.23.1 - 2016-04-15
2
14
 
3
15
  ### Other
@@ -134,6 +134,9 @@ module Sensu
134
134
  unless check[:executed].is_a?(Integer)
135
135
  raise DataError, "check executed timestamp must be an integer"
136
136
  end
137
+ unless check[:ttl].nil? || (check[:ttl].is_a?(Integer) && check[:ttl] > 0)
138
+ raise DataError, "check ttl must be an integer greater than 0"
139
+ end
137
140
  end
138
141
 
139
142
  # Publish a check result to the Sensu transport.
@@ -144,8 +147,16 @@ module Sensu
144
147
  :client => @settings[:client][:name],
145
148
  :check => check.merge(:issued => Time.now.to_i)
146
149
  }
150
+ payload[:signature] = @settings[:client][:signature] if @settings[:client][:signature]
147
151
  @logger.info("publishing check result", :payload => payload)
148
- @transport.publish(:direct, "results", Sensu::JSON.dump(payload))
152
+ @transport.publish(:direct, "results", Sensu::JSON.dump(payload)) do |info|
153
+ if info[:error]
154
+ @logger.error("failed to publish check result", {
155
+ :payload => payload,
156
+ :error => info[:error].to_s
157
+ })
158
+ end
159
+ end
149
160
  end
150
161
 
151
162
  # Process a check result. Set check result attribute defaults,
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  unless defined?(Sensu::VERSION)
3
3
  # Sensu release version.
4
- VERSION = "0.23.1".freeze
4
+ VERSION = "0.23.2".freeze
5
5
 
6
6
  # Sensu check severities.
7
7
  SEVERITIES = %w[ok warning critical unknown].freeze
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.23.1
4
+ version: 0.23.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-04-15 00:00:00.000000000 Z
12
+ date: 2016-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -294,3 +294,4 @@ signing_key:
294
294
  specification_version: 4
295
295
  summary: A monitoring framework
296
296
  test_files: []
297
+ has_rdoc: false