sensu-plugins-nginx 2.1.0 → 2.2.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 +6 -1
- data/bin/metrics-nginx.rb +6 -0
- data/lib/sensu-plugins-nginx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f91006d3a2911836cca95f8deab121163b9dd0cd
|
|
4
|
+
data.tar.gz: b73a1860364049fac976e9556fca40ab177c4492
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6043962646a2159114b2763d5144cbde906102d8911bf2117fcc084e6d4254b120f39a1502f4b250a8d4bd44cc84c3d127b956513672d7080e7c61df58756cce
|
|
7
|
+
data.tar.gz: bebcde8d556434511c8055a075e38a2823ef9770a76b7d67f53e1c599d0baeb20335fc8b362ce65cb75b9415de30f74ed24b8ddaca6b5a7c04df6671df8c65db
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
### [2.2.0] - 2017-07-02
|
|
9
|
+
## Added
|
|
10
|
+
- add jwt token support
|
|
11
|
+
|
|
8
12
|
## [2.1.0] - 2017-02-28
|
|
9
13
|
### Added
|
|
10
14
|
- add `check-nginx-status` plugin (@hany)
|
|
@@ -60,7 +64,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
|
60
64
|
## 0.0.1 - 2015-02-11 **YANKED**
|
|
61
65
|
- initial stable release
|
|
62
66
|
|
|
63
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/2.
|
|
67
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/2.2.0...HEAD
|
|
68
|
+
[2.2.0]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/2.1.0...2.2.0
|
|
64
69
|
[2.1.0]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/2.0.0...2.1.0
|
|
65
70
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/1.0.0...2.0.0
|
|
66
71
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-nginx/compare/0.0.6...1.0.0
|
data/bin/metrics-nginx.rb
CHANGED
|
@@ -61,6 +61,9 @@ class NginxMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
|
61
61
|
option :hostheader,
|
|
62
62
|
long: '--hostheader HOSTHEADER',
|
|
63
63
|
description: 'Set the Host header to this string'
|
|
64
|
+
option :token,
|
|
65
|
+
long: '--token token',
|
|
66
|
+
description: 'JWT Token'
|
|
64
67
|
|
|
65
68
|
option :scheme,
|
|
66
69
|
description: 'Metric naming scheme, text to prepend to metric',
|
|
@@ -86,6 +89,9 @@ class NginxMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
|
86
89
|
if config[:hostheader]
|
|
87
90
|
request['Host'] = config[:hostheader]
|
|
88
91
|
end
|
|
92
|
+
if config[:token]
|
|
93
|
+
request['Authorization'] = "Bearer #{config[:token]}"
|
|
94
|
+
end
|
|
89
95
|
response = http.request(request)
|
|
90
96
|
if response.code == '200'
|
|
91
97
|
found = true
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sensu-plugins-nginx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.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: 2017-
|
|
11
|
+
date: 2017-07-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sensu-plugin
|