sensu-plugins-nginx 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 476205e6bed938636daf2e723fdca5d0547eadd5
4
- data.tar.gz: 24104bf3d8f97424618621b661c752f22dee69a0
3
+ metadata.gz: f91006d3a2911836cca95f8deab121163b9dd0cd
4
+ data.tar.gz: b73a1860364049fac976e9556fca40ab177c4492
5
5
  SHA512:
6
- metadata.gz: 95133fd68e7d3834c3c0e84cc18a78fea12f496a2720e0081c26e4d0ed4563f1f3f09ae476e57017a28b23f900e3ad4ea26a9b5b24491b697d56c2ac0108e722
7
- data.tar.gz: 338d1d7f21e436e95fd277223e710c2451dc66551c15bda7ad412ff2b0ca576a35b29ac9a1740a1f4fa5c7142f98788adf6327993de03dbfb7351ac0cf37ca4d
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.1.0...HEAD
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
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsNginx
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 1
4
+ MINOR = 2
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.1.0
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-03-01 00:00:00.000000000 Z
11
+ date: 2017-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin