sensu-plugins-http 2.11.0 → 3.0.0

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: ee65bed5670246b5af15d48460ed5cd47f08190ea3cb84be81e1a29baf468815
4
- data.tar.gz: 2581a8b459e0554cdb6939716dec864b0c60ffbdfcb2d0f8fe7b6b6ce3f79253
3
+ metadata.gz: 38c996485865eb03a270ca5b91d56c240dcd183c8034948c195424e68ca1dc8e
4
+ data.tar.gz: 07739716e28110be2b0a652eee6aae4bfc003c5281468e299b0e5af3be6d3257
5
5
  SHA512:
6
- metadata.gz: 4bc5dfdcf0417dbea0ad6c9a34c9a0f6529489888e85761b8ec586da75c3b1f789b29a3cccfe87ae25fd2c70b68ab6631e395ca75dd6a5293e0788034f6362fc
7
- data.tar.gz: 603dcac8c82f736761c387a1a646ae5393ac0a66a940519ba6c9863525e6d36a1c1c18d0aed62fabe126b5d3d5761be5a0d75d566f6ff6777a8ea4e550d69910
6
+ metadata.gz: a665e88d9ac92ab05c0f114f53a916f84346a8be2ae73225dba93b5003780cbc5f1f6a0a41bb073df6cf18c965a696dc1dc6df9322984e19c13c5d3b11cd3404
7
+ data.tar.gz: e98e8cfe0ca501834c17936aed442c9a1aa539717ff6ad8861d53102e7f212fc066a0f758d840d7f9b8f3d270b07b25c627a11a1c22fe99f9579ada3097eb69f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+
9
+
10
+ ## [3.0.0] - 2018-08-19
11
+ ### Breaking Changes
12
+ - removed ruby `< 2.3` support as they are EOL per our support [policy](https://github.com/sensu/sensu-docs/blob/master/content/plugins/1.0/faq.md#what-is-the-policy-on-supporting-end-of-lifeeol-ruby-versions) (@majormoses)
13
+ - bumped dependency of `sensu-plugin` to 2.x you can read about it [here](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#v145---2017-03-07) (@majormoses)
14
+
15
+ ### Changed
16
+ - `metrics-http-json-deep.rb`: add option `--floats` to control the number of decimal places (default to 4), for use with `--number` (@CosmoPennypacker)
17
+
8
18
  ## [2.11.0] - 2018-06-04
9
19
  ### Added
10
20
  - `check-http-json.rb`: add option `--response-code` for checking the HTTP response code
@@ -198,7 +208,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
198
208
  ### Added
199
209
  - Initial release
200
210
 
201
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.11.0...HEAD
211
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/3.0.0...HEAD
212
+ [3.0.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.11.0...3.0.0
202
213
  [2.11.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.10.0...2.11.0
203
214
  [2.10.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.9.0...2.10.0
204
215
  [2.9.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.4...2.9.0
data/README.md CHANGED
@@ -34,4 +34,4 @@ This is helpful if you do not want to configure connection information as an arg
34
34
  ## Notes
35
35
 
36
36
  ### check-http.rb and check-https-cert.rb
37
- This check is not really geared to check all of the complexities of ssl which is why there is a separate repo and set of checks for that: https://github.com/sensu-plugins/sensu-plugins-ssl. If you are trying to say verify cert exipiration you will notice that in some cases it does not do what you always expect it to do. For example it might appear that when using using `-k` option you see different expiration times. This is due to the fact that when using `-k` it does not check expiration of all of the certs in the chain. Rather than duplicate this behavior in this check use the other repo where we handle those more complicated ssl checks better. For more information see: https://github.com/sensu-plugins/sensu-plugins-http/issues/67
37
+ This check is not really geared to check all of the complexities of ssl which is why there is a separate repo and set of checks for that: https://github.com/sensu-plugins/sensu-plugins-ssl. If you are trying to verify cert expiration you will notice that in some cases it does not do what you always expect it to do. For example it might appear that when using using `-k` option you see different expiration times. This is due to the fact that when using `-k` it does not check expiration of all of the certs in the chain. Rather than duplicate this behavior in this check use the other repo where we handle those more complicated ssl checks better. For more information see: https://github.com/sensu-plugins/sensu-plugins-http/issues/67
@@ -79,13 +79,22 @@ class JsonDeepMetrics < Sensu::Plugin::Metric::CLI::Graphite
79
79
  short: '-n',
80
80
  long: '--number'
81
81
 
82
+ option :decimal_places,
83
+ description: 'Number of decimal places to allow, to be used with --number',
84
+ short: '-f DECIMAL_PLACES',
85
+ long: '--floats DECIMAL_PLACES',
86
+ proc: proc(&:to_i),
87
+ default: 4
88
+
82
89
  def deep_value(hash, scheme = '')
83
90
  hash.each do |key, value|
84
91
  ekey = key.gsub(/\s/, '_')
85
92
  if value.is_a?(Hash)
86
93
  deep_value(value, "#{scheme}.#{ekey}")
94
+ elsif config[:numonly] && value.is_a?(Numeric)
95
+ output "#{scheme}.#{ekey}", value.round(config[:decimal_places])
87
96
  else
88
- output "#{scheme}.#{ekey}", value unless config[:numonly] && !value.is_a?(Integer)
97
+ output "#{scheme}.#{ekey}", value
89
98
  end
90
99
  end
91
100
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  module SensuPluginsHttp
4
4
  module Version
5
- MAJOR = 2
6
- MINOR = 11
5
+ MAJOR = 3
6
+ MINOR = 0
7
7
  PATCH = 0
8
8
 
9
9
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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: 2.11.0
4
+ version: 3.0.0
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: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '2.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '2.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -321,7 +321,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
321
321
  requirements:
322
322
  - - ">="
323
323
  - !ruby/object:Gem::Version
324
- version: 2.1.0
324
+ version: 2.3.0
325
325
  required_rubygems_version: !ruby/object:Gem::Requirement
326
326
  requirements:
327
327
  - - ">="