sensu-plugins-http 5.1.0 → 5.1.1

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
  SHA256:
3
- metadata.gz: 2af4e6fd8cd18a7985667f12d1b92e95220626fe93d7f4e30df5c98cd2d21fca
4
- data.tar.gz: 772256bc9710bf634682aa4909f5f10b29e3fd07b9237dcb8ab61bc66fe85c21
3
+ metadata.gz: 1b0495f80bf93d4fd28a5974b5af0d2f11861e50778fb1b1972281a64a63d623
4
+ data.tar.gz: 6c09b75331eac1000e9b8d7f4d13febac4309d50d6a7b7e1b5b8721b05386156
5
5
  SHA512:
6
- metadata.gz: fdf3bbd67f93c1a9a640832cc251bc18224c411eae29cba465ae2abb516405258694e73ede7f3407be55c365bbb0dbbcc780433e07a9dcc2b78a1d079a4d0fbf
7
- data.tar.gz: 1461ab44a224cbeb8d4d6b72565bf04b0197207ff1b50bbed9b6f747c4b05729cbd2366f6680bd0b7fc81c3414c45fadaaab433b6c27b808aec8354097420aa5
6
+ metadata.gz: 649da5a29714d569bc287e19a4a76185dce76f1d791db61f6167b51721a3e0b57aea7b89fa0e61349bb212e1bc6621b59eff97cb1fb7c67f38c169724345e1fc
7
+ data.tar.gz: fed3fc5d2cfd2c1f07a7a890749f4370377114522fbc5851b41c93be0a4704edbaaade8f24b216f153434a7939d699f9c8766ed44a95a1075b4ddc188eaae288
@@ -5,6 +5,11 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [5.1.1] - 2019-06-21
9
+ ### Fixed
10
+ - Fix issue with JSON.parse referencing sensu-plugin subclass instead of top level ::JSON module as intended
11
+ - Fix missing runtime dependancy on oj needed for metrics-http-json-deep.rb
12
+
8
13
  ## [5.1.0] - 2019-05-06
9
14
  ### Added
10
15
  metrics-http-json.rb: Added the option to disable ssl cert verification
@@ -239,7 +244,8 @@ metrics-http-json.rb: Added debug option to see the processing of json data
239
244
  ### Added
240
245
  - Initial release
241
246
 
242
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/5.1.0...HEAD
247
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/5.1.1...HEAD
248
+ [5.1.1]: https://github.com/sensu-plugins/sensu-plugins-http/compare/5.1.0...5.1.1
243
249
  [5.1.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/5.0.0...5.1.0
244
250
  [5.0.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/4.1.0...5.0.0
245
251
  [4.1.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/4.0.0...4.1.0
@@ -141,9 +141,9 @@ class CheckJson < Sensu::Plugin::Check::CLI
141
141
  end
142
142
 
143
143
  def json_valid?(str)
144
- JSON.parse(str)
144
+ ::JSON.parse(str)
145
145
  return true
146
- rescue JSON::ParserError
146
+ rescue ::JSON::ParserError
147
147
  return false
148
148
  end
149
149
 
@@ -194,7 +194,7 @@ class CheckJson < Sensu::Plugin::Check::CLI
194
194
  critical 'invalid JSON from request' unless json_valid?(res.body)
195
195
  ok 'valid JSON returned' if config[:key].nil? && config[:value].nil?
196
196
 
197
- json = JSON.parse(res.body)
197
+ json = ::JSON.parse(res.body)
198
198
 
199
199
  begin
200
200
  leaf = deep_value(json, config[:key])
@@ -218,7 +218,7 @@ class CheckJson < Sensu::Plugin::Check::CLI
218
218
  ok message
219
219
  rescue StandardError => e
220
220
  if config[:dump_json]
221
- json_response = config[:pretty] ? JSON.pretty_generate(json) : json
221
+ json_response = config[:pretty] ? ::JSON.pretty_generate(json) : json
222
222
  message = "key check failed: #{e}. Response: #{json_response}"
223
223
  else
224
224
  message = "key check failed: #{e}"
@@ -100,13 +100,13 @@ class HttpJsonGraphite < Sensu::Plugin::Metric::CLI::Graphite
100
100
  metric, attribute = m.to_s.split(/::/)
101
101
  puts "metric: #{metric}, attribute: #{attribute}" if config[:debug]
102
102
  unless object.nil?
103
- JSON.parse(r)[object].each do |k, v|
103
+ ::JSON.parse(r)[object].each do |k, v|
104
104
  if k == attribute
105
105
  output([scheme, metric].join('.'), v)
106
106
  end
107
107
  end
108
108
  end
109
- JSON.parse(r).each do |k, v|
109
+ ::JSON.parse(r).each do |k, v|
110
110
  if k == attribute
111
111
  output([scheme, metric].join('.'), v)
112
112
  end
@@ -4,7 +4,7 @@ module SensuPluginsHttp
4
4
  module Version
5
5
  MAJOR = 5
6
6
  MINOR = 1
7
- PATCH = 0
7
+ PATCH = 1
8
8
 
9
9
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2019-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: oj
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.18'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.18'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rest-client
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -294,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
308
  - !ruby/object:Gem::Version
295
309
  version: '0'
296
310
  requirements: []
297
- rubygems_version: 3.0.3
311
+ rubygems_version: 3.0.4
298
312
  signing_key:
299
313
  specification_version: 4
300
314
  summary: Sensu plugins for various http monitors and metrics