sensu-plugins-http 2.8.4 → 2.9.0
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 +4 -4
- data/CHANGELOG.md +7 -1
- data/bin/check-http-json.rb +7 -0
- data/lib/sensu-plugins-http/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c1ad8fa12d72b4c1d5066f479d1aa256c8c8eae21f8a151662d75952ede6aee
|
4
|
+
data.tar.gz: fe2f4cd9cc094b5f392b70147d8c78f711f2260d5963a12aeb4b4fd0642dbd76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1bbe80432676b89d5ae45bac7f213b5ecb4a42780a1c71ed905a9dee9d7a286d84fafa61c3cec9a10c91b591aeaa33ed891428576b69b8e2483e1082b45e82
|
7
|
+
data.tar.gz: 7663c32efff7508fc3500f333e05af69981656d8f0bbf6d9038d7c40acd4f8397c06ececdd6ac8386f5b07dd129093343baf7b6822b4a1f5095283ce0fca5322
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
|
9
|
+
## [2.9.0] - 2018-05-03
|
10
|
+
### Added
|
11
|
+
- `check-http-json.rb`: add option `--post-body` to include a post body (@andy-s-clark)
|
12
|
+
|
8
13
|
## [2.8.4] - 2018-03-27
|
9
14
|
### Security
|
10
15
|
- updated yard dependency to `~> 0.9.11` per: https://nvd.nist.gov/vuln/detail/CVE-2017-17042 (@majormoses)
|
@@ -185,7 +190,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
185
190
|
### Added
|
186
191
|
- Initial release
|
187
192
|
|
188
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.
|
193
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.9.0...HEAD
|
194
|
+
[2.9.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.4...2.9.0
|
189
195
|
[2.8.4]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.3...2.8.4
|
190
196
|
[2.8.3]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.2...2.8.3
|
191
197
|
[2.8.2]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.1...2.8.2
|
data/bin/check-http-json.rb
CHANGED
@@ -28,6 +28,9 @@
|
|
28
28
|
# greater than 10
|
29
29
|
# ./check-http-json.rb -u http://my.site.com/metric.json --key page.totalElements --value-greater-than 10
|
30
30
|
#
|
31
|
+
# Check that will POST json
|
32
|
+
# ./check-http-json.rb -u http://my.site.com/metric.json -m POST --header 'Content-type: application/json' --post-body '{"serverId": "myserver"}'
|
33
|
+
#
|
31
34
|
# NOTES:
|
32
35
|
# Based on Check HTTP by Sonian Inc.
|
33
36
|
#
|
@@ -53,6 +56,7 @@ class CheckJson < Sensu::Plugin::Check::CLI
|
|
53
56
|
option :port, short: '-P PORT', proc: proc(&:to_i)
|
54
57
|
option :method, short: '-m GET|POST'
|
55
58
|
option :postbody, short: '-b /file/with/post/body'
|
59
|
+
option :post_body, long: '--post-body VALUE'
|
56
60
|
option :header, short: '-H HEADER', long: '--header HEADER'
|
57
61
|
option :ssl, short: '-s', boolean: true, default: false
|
58
62
|
option :insecure, short: '-k', boolean: true, default: false
|
@@ -164,6 +168,9 @@ class CheckJson < Sensu::Plugin::Check::CLI
|
|
164
168
|
post_body = IO.readlines(config[:postbody])
|
165
169
|
req.body = post_body.join
|
166
170
|
end
|
171
|
+
if config[:post_body]
|
172
|
+
req.body = config[:post_body]
|
173
|
+
end
|
167
174
|
unless config[:user].nil? && config[:password].nil?
|
168
175
|
req.basic_auth config[:user], config[:password]
|
169
176
|
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: 2.
|
4
|
+
version: 2.9.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-03
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|