sensu-plugins-http 0.0.2 → 0.1.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +7 -2
- data/bin/check-http.rb +14 -3
- data/lib/sensu-plugins-http/version.rb +2 -2
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 775d6609a369fae147e20a5563c6b2a0d2156957
|
4
|
+
data.tar.gz: c909837a8a4710b3c29c918a0dc2a64d0e2ea309
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dee5c85335baaf01f579679d1b5e14d7ce846ce16aa39dde862e00ed8da7d5aed41fc615b7bd8fd5fd203bc50fa61add2db959cceef2f1dcb81022d88323e868
|
7
|
+
data.tar.gz: 407cafec20c53bf6155d7396317c6f25f8f39438b2cc0115a7e840ee9bcbc85e8f14f060b5b069e295de9877aa816a4a352048e174a6cf0e043ed2cd1563ea16
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -3,9 +3,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
-
##
|
6
|
+
## 0.1.0 - 2015-06-18
|
7
|
+
- A new non-breaking feature - the ability to print the whole response from the http call done in the check-http.rb check to the sensu alert. This can be done by specifying the ```-w``` or ```--whole-response``` parameters.
|
8
|
+
- Gitignore was updated with more files from Intellij IDEA
|
9
|
+
|
10
|
+
## 0.0.2 - 2015-06-03
|
11
|
+
- Fix the build
|
7
12
|
|
8
13
|
## 0.0.1 - 2015-05-21
|
9
14
|
|
10
15
|
### Added
|
11
|
-
-
|
16
|
+
- Initial release
|
data/bin/check-http.rb
CHANGED
@@ -131,6 +131,13 @@ class CheckHttp < Sensu::Plugin::Check::CLI
|
|
131
131
|
long: '--redirect-to URL',
|
132
132
|
description: 'Redirect to another page'
|
133
133
|
|
134
|
+
option :whole_response,
|
135
|
+
short: '-w',
|
136
|
+
long: '--whole-response',
|
137
|
+
boolean: true,
|
138
|
+
default: false,
|
139
|
+
description: 'Print whole output when check fails'
|
140
|
+
|
134
141
|
option :response_bytes,
|
135
142
|
short: '-b BYTES',
|
136
143
|
long: '--response-bytes BYTES',
|
@@ -230,10 +237,14 @@ class CheckHttp < Sensu::Plugin::Check::CLI
|
|
230
237
|
end
|
231
238
|
res = http.request(req)
|
232
239
|
|
233
|
-
if config[:
|
234
|
-
body = "\n" + res.body
|
240
|
+
if config[:whole_response]
|
241
|
+
body = "\n" + res.body
|
235
242
|
else
|
236
|
-
|
243
|
+
if config[:response_bytes]
|
244
|
+
body = "\n" + res.body[0..config[:response_bytes]]
|
245
|
+
else
|
246
|
+
body = ''
|
247
|
+
end
|
237
248
|
end
|
238
249
|
|
239
250
|
if config[:require_bytes] && res.body.length != config[:require_bytes]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
31
|
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-06-
|
33
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: sensu-plugin
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
name: rubocop
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0.30'
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0.30'
|
77
77
|
- !ruby/object:Gem::Dependency
|
metadata.gz.sig
CHANGED
Binary file
|