sensu-plugins-http 2.9.0 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/bin/check-http.rb +13 -0
- data/lib/sensu-plugins-http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7ad8cff5dc35071f986cfa1045f3975c8ffbddfc85df368913c9ec5c69519ec
|
4
|
+
data.tar.gz: 3eb9c03bed43c24a5087041169fc76dc06251d0e5a11a7a5ac401a8296462a3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07956574d712f483e036d5ceecf2d1ac13d4557467ea63e2a799b9814febd9b40bf0f12810ce0c4db02e13fd7cc9f2897536bb2e9eb0b5cad09f6973975db046
|
7
|
+
data.tar.gz: 2b2d8c0a3e995aee4bcec18caff9d8eed00885b2f48277f5757731252a7009c65ffaa8f8c7e89eb1562a09854f3cee2b7bdce9a90d6c6b94e17a95cb433b11ba
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,9 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [2.10.0] - 2018-05-23
|
9
|
+
### Added
|
10
|
+
- `check-http.rb`: add option `--min-bytes` to check if a response is greater than minimum specified value (@lisfo4ka)
|
8
11
|
|
9
12
|
## [2.9.0] - 2018-05-03
|
10
13
|
### Added
|
@@ -190,7 +193,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
190
193
|
### Added
|
191
194
|
- Initial release
|
192
195
|
|
193
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.
|
196
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.10.0...HEAD
|
197
|
+
[2.10.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.9.0...2.10.0
|
194
198
|
[2.9.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.4...2.9.0
|
195
199
|
[2.8.4]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.3...2.8.4
|
196
200
|
[2.8.3]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.8.2...2.8.3
|
data/bin/check-http.rb
CHANGED
@@ -24,6 +24,9 @@
|
|
24
24
|
# Pattern check - expect a 200 response and the string 'OK' in the body
|
25
25
|
# check-http.rb -u http://my.site.com/health -q 'OK'
|
26
26
|
#
|
27
|
+
# Check if a response is greater than the specified minimum value
|
28
|
+
# check-http.rb -u https://my.site.com/redirect --min-bytes 10
|
29
|
+
#
|
27
30
|
# Check response code - expect a 301 response
|
28
31
|
# check-http.rb -u https://my.site.com/redirect --response-code 301 -r
|
29
32
|
#
|
@@ -195,6 +198,12 @@ class CheckHttp < Sensu::Plugin::Check::CLI
|
|
195
198
|
description: 'Check the response contains exactly BYTES bytes',
|
196
199
|
proc: proc(&:to_i)
|
197
200
|
|
201
|
+
option :min_bytes,
|
202
|
+
short: '-g BYTES',
|
203
|
+
long: '--min-bytes BYTES',
|
204
|
+
description: 'Check the response contains at least BYTES bytes',
|
205
|
+
proc: proc(&:to_i)
|
206
|
+
|
198
207
|
option :response_code,
|
199
208
|
long: '--response-code CODE',
|
200
209
|
description: 'Check for a specific response code'
|
@@ -338,6 +347,10 @@ class CheckHttp < Sensu::Plugin::Check::CLI
|
|
338
347
|
critical "Response was #{res.body.length} bytes instead of #{config[:require_bytes]}" + body
|
339
348
|
end
|
340
349
|
|
350
|
+
if config[:min_bytes] && res.body.length < config[:min_bytes]
|
351
|
+
critical "Response was #{res.body.length} bytes instead of the indicated minimum #{config[:min_bytes]}" + body
|
352
|
+
end
|
353
|
+
|
341
354
|
unless warn_cert_expire.nil?
|
342
355
|
warning "Certificate will expire #{warn_cert_expire}"
|
343
356
|
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.10.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-05-
|
11
|
+
date: 2018-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
329
329
|
version: '0'
|
330
330
|
requirements: []
|
331
331
|
rubyforge_project:
|
332
|
-
rubygems_version: 2.7.
|
332
|
+
rubygems_version: 2.7.7
|
333
333
|
signing_key:
|
334
334
|
specification_version: 4
|
335
335
|
summary: Sensu plugins for various http monitors and metrics
|