sensu-plugins-nginx 1.0.0 → 2.0.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 +20 -4
- data/README.md +0 -1
- data/bin/metrics-nginx.rb +10 -3
- data/lib/sensu-plugins-nginx/version.rb +1 -1
- metadata +14 -35
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- 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: 05d1419977c60acb91e63b663fcc053cf8e76649
|
4
|
+
data.tar.gz: 2b0476465460a7a844d5db59192f88af53590328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c35f35a6c7a717e6a41feab1ebfd51aea9e8700a9f22cfdc6ec66584a57420771462475a21af709838aa304f6a6251a479ab86b802e31cbd2f84d7c368bdcd74
|
7
|
+
data.tar.gz: 66050a2c8581f4806e9e539bd6057117d72d32d328e9a001fca7ed2faddc7e1dc138c9456b100d0e400d12637093aaf2d0178c2adf11d15f0edfe992a3b5ab02
|
data/CHANGELOG.md
CHANGED
@@ -3,9 +3,17 @@ 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
|
-
## Unreleased
|
6
|
+
## [Unreleased]
|
7
7
|
|
8
|
-
[
|
8
|
+
## [2.0.0] - 2016-05-24
|
9
|
+
### Changed
|
10
|
+
- remove support for rubies < 2.0
|
11
|
+
- update to rubocop 0.40 and cleanup
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- ability to specify custom host header values
|
15
|
+
|
16
|
+
## [1.0.0] - 2015-12-03
|
9
17
|
### Added
|
10
18
|
- metrics-nginx.rb: Added default hostname of 'localhost'
|
11
19
|
- metrics-nginx.rb: Added usage
|
@@ -28,7 +36,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
28
36
|
- updated sensu-plugin gem to 1.2.0
|
29
37
|
|
30
38
|
## [0.0.3] - 2015-06-10 **YANKED**
|
31
|
-
|
32
39
|
### Changed
|
33
40
|
- changed the name of nginx-metrics.rb to metrics-nginx.rb to conform to std naming
|
34
41
|
- nginx-metrics.rb is now depericiated and will be removed in a future release
|
@@ -46,5 +53,14 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
46
53
|
### Changed
|
47
54
|
- removed cruft from /lib
|
48
55
|
|
49
|
-
##
|
56
|
+
## 0.0.1 - 2015-02-11 **YANKED**
|
50
57
|
- initial stable release
|
58
|
+
|
59
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/2.0.0...HEAD
|
60
|
+
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/1.0.0...2.0.0
|
61
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.6...1.0.0
|
62
|
+
[0.0.6]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.5...0.0.6
|
63
|
+
[0.0.5]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.4...0.0.5
|
64
|
+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.3...0.0.4
|
65
|
+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.2...0.0.3
|
66
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-nginx)
|
6
6
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-nginx)
|
7
7
|
[](https://gemnasium.com/sensu-plugins/sensu-plugins-nginx)
|
8
|
-
[](https://codeship.com/projects/75658)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
data/bin/metrics-nginx.rb
CHANGED
@@ -58,6 +58,10 @@ class NginxMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
58
58
|
description: 'Path to your stub status module',
|
59
59
|
default: 'nginx_status'
|
60
60
|
|
61
|
+
option :hostheader,
|
62
|
+
long: '--hostheader HOSTHEADER',
|
63
|
+
description: 'Set the Host header to this string'
|
64
|
+
|
61
65
|
option :scheme,
|
62
66
|
description: 'Metric naming scheme, text to prepend to metric',
|
63
67
|
short: '-s SCHEME',
|
@@ -79,6 +83,9 @@ class NginxMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
79
83
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
80
84
|
end
|
81
85
|
request = Net::HTTP::Get.new(uri.request_uri)
|
86
|
+
if config[:hostheader]
|
87
|
+
request['Host'] = config[:hostheader]
|
88
|
+
end
|
82
89
|
response = http.request(request)
|
83
90
|
if response.code == '200'
|
84
91
|
found = true
|
@@ -95,17 +102,17 @@ class NginxMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
95
102
|
|
96
103
|
# #YELLOW
|
97
104
|
response.body.split(/\r?\n/).each do |line|
|
98
|
-
if line
|
105
|
+
if line =~ /^Active connections:\s+(\d+)/
|
99
106
|
connections = line.match(/^Active connections:\s+(\d+)/).to_a
|
100
107
|
output "#{config[:scheme]}.active_connections", connections[1]
|
101
108
|
end
|
102
|
-
if line
|
109
|
+
if line =~ /^\s+(\d+)\s+(\d+)\s+(\d+)/
|
103
110
|
requests = line.match(/^\s+(\d+)\s+(\d+)\s+(\d+)/).to_a
|
104
111
|
output "#{config[:scheme]}.accepts", requests[1]
|
105
112
|
output "#{config[:scheme]}.handled", requests[2]
|
106
113
|
output "#{config[:scheme]}.requests", requests[3]
|
107
114
|
end
|
108
|
-
if line
|
115
|
+
if line =~ /^Reading:\s+(\d+).*Writing:\s+(\d+).*Waiting:\s+(\d+)/
|
109
116
|
queue = line.match(/^Reading:\s+(\d+).*Writing:\s+(\d+).*Waiting:\s+(\d+)/).to_a
|
110
117
|
output "#{config[:scheme]}.reading", queue[1]
|
111
118
|
output "#{config[:scheme]}.writing", queue[2]
|
metadata
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
|
14
|
-
am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
|
15
|
-
A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaMEMxEjAQBgNVBAMM
|
16
|
-
CW1hdHRqb25lczEYMBYGCgmSJomT8ixkARkWCHlpZWxkYm90MRMwEQYKCZImiZPy
|
17
|
-
LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTSzVYnO
|
18
|
-
CLgyrIyT1mBQakArQyW8xhi6MlDqyzXHJGeERT790U6EgoBVeS4XoK0ptFZNR8Tf
|
19
|
-
zko0w+Nv47TarSCgkPOaxY+mxWnAVR10dOmfeLr7huiMyps+YD56/EF2FqQ3jf/+
|
20
|
-
qohENfKD91qy1ieEy+Fn7Pf74ltbNKUdkb9a9eFXQ0DQ4ip5vik7DzjQkUTj4lca
|
21
|
-
k6ArwnmHX4YDhZoYtrQJ8jVktN0/+NtA40M5qkCYHNe5tUW25b/tKVYuioxG6b2Z
|
22
|
-
oIzaZxRLxf6HVAWpCVRT/F5+/yjigkX4u++eYacfLGleXQzoK7BL65vHGMJygWEE
|
23
|
-
0TKGqFOrl/L0AQIDAQABo38wfTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
|
24
|
-
HQ4EFgQUEf6a8Td7MrSZc8ImbLFZAENPbz0wIQYDVR0RBBowGIEWbWF0dGpvbmVz
|
25
|
-
QHlpZWxkYm90LmNvbTAhBgNVHRIEGjAYgRZtYXR0am9uZXNAeWllbGRib3QuY29t
|
26
|
-
MA0GCSqGSIb3DQEBBQUAA4IBAQBbzXAYA3BVGw8DZ0YYoY1VHPNEcH5qPIApmHO8
|
27
|
-
rvSmuUT0yMEi7u00H/5uHRFf4LleGT/+sTdyXKsNPGT9kdRuQEgwi+vf7Zfvd8aX
|
28
|
-
UF/+4VkEYf/8rV8Ere6u2QaWPgApdMV6JjKr1fAwCTd8AuGXNaWItiPPMseSQzLJ
|
29
|
-
JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
|
30
|
-
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
|
-
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2015-12-03 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
34
12
|
dependencies:
|
35
13
|
- !ruby/object:Gem::Dependency
|
36
14
|
name: sensu-plugin
|
37
15
|
requirement: !ruby/object:Gem::Requirement
|
38
16
|
requirements:
|
39
|
-
- -
|
17
|
+
- - "~>"
|
40
18
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.2
|
19
|
+
version: '1.2'
|
42
20
|
type: :runtime
|
43
21
|
prerelease: false
|
44
22
|
version_requirements: !ruby/object:Gem::Requirement
|
45
23
|
requirements:
|
46
|
-
- -
|
24
|
+
- - "~>"
|
47
25
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.2
|
26
|
+
version: '1.2'
|
49
27
|
- !ruby/object:Gem::Dependency
|
50
28
|
name: bundler
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,16 +126,16 @@ dependencies:
|
|
148
126
|
name: rubocop
|
149
127
|
requirement: !ruby/object:Gem::Requirement
|
150
128
|
requirements:
|
151
|
-
- -
|
129
|
+
- - "~>"
|
152
130
|
- !ruby/object:Gem::Version
|
153
|
-
version: 0.
|
131
|
+
version: 0.40.0
|
154
132
|
type: :development
|
155
133
|
prerelease: false
|
156
134
|
version_requirements: !ruby/object:Gem::Requirement
|
157
135
|
requirements:
|
158
|
-
- -
|
136
|
+
- - "~>"
|
159
137
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.
|
138
|
+
version: 0.40.0
|
161
139
|
- !ruby/object:Gem::Dependency
|
162
140
|
name: yard
|
163
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
183
|
requirements:
|
206
184
|
- - ">="
|
207
185
|
- !ruby/object:Gem::Version
|
208
|
-
version: 1
|
186
|
+
version: '2.1'
|
209
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
188
|
requirements:
|
211
189
|
- - ">="
|
@@ -213,8 +191,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
191
|
version: '0'
|
214
192
|
requirements: []
|
215
193
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.5.1
|
217
195
|
signing_key:
|
218
196
|
specification_version: 4
|
219
197
|
summary: Sensu plugins for the NGINX server
|
220
198
|
test_files: []
|
199
|
+
has_rdoc:
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
Binary file
|