sensu-plugins-elasticsearch 1.1.0 → 1.1.1

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: 4ed5007f08f3c8b041dbdefc02e3048eedea4344
4
- data.tar.gz: bae5313f706c29f0ac15b9c6f1d14ca5f62ec548
3
+ metadata.gz: 3f7600762037d73659509576437eef0a316a9d5a
4
+ data.tar.gz: e0cc27195701ab4049c8f6ea15bcb968c390ad92
5
5
  SHA512:
6
- metadata.gz: 4c98a9beafb8521e83dbfe30a1d2899f06408637f87e5541f3e21c517cde5de050c9edbb2e2e153f2a31f35b3c667457e197ff9e3867de29ba8140f24a14a349
7
- data.tar.gz: 063d44a9119a86445aa315e2d192c62e0ade50722482be8b7a15103b845a83d5f7eef000fb055a79b4fa54ed4b0f5cf5798e40347019e4184b9a6205bca1f461
6
+ metadata.gz: d2801947e4560f554fbddb7bbe44e1bcd9a3c20b83648e10311be52fc7f27eefe3ab54118a5c90fb822e39486c381b3c32f3840f52f603491700597dcbe16830
7
+ data.tar.gz: d81addcbe586df2a477c0096121da1fb5596261b622ab1078877dc4635fe05b7027b3cd896ec6922a792b12bd7a85d5324c72719fe2c302c15ae313562404725
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.1.1] - 2016-11-26
9
+ ### Fixed
10
+ - Fixed check-es-file-descriptors.rb was not compatible with Elasticsearch 5.0 (@woqer)
11
+
8
12
  ## [1.1.0] - 2016-11-14
9
13
  ### Changed
10
14
  - Changed check-es-heap.rb to be compatible with Elasticsearch 5.0 (@christianherro)
@@ -122,7 +126,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
122
126
  ### Added
123
127
  - initial release
124
128
 
125
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.0...HEAD
129
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.1...HEAD
130
+ [1.1.1]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.0...1.1.1
126
131
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.0.0...1.1.0
127
132
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/0.5.3...1.0.0
128
133
  [0.5.3]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/0.4.3...0.5.3
@@ -110,8 +110,16 @@ class ESFileDescriptors < Sensu::Plugin::Check::CLI
110
110
  info['version']['number']
111
111
  end
112
112
 
113
+ def es_version
114
+ @es_version ||= Gem::Version.new(acquire_es_version)
115
+ end
116
+
113
117
  def acquire_open_fds
114
- stats = get_es_resource('/_nodes/_local/stats?process=true')
118
+ stats = if es_version < Gem::Version.new('5.0.0')
119
+ get_es_resource('/_nodes/_local/stats?process=true')
120
+ else
121
+ get_es_resource('/_nodes/_local/stats/process')
122
+ end
115
123
  begin
116
124
  keys = stats['nodes'].keys
117
125
  stats['nodes'][keys[0]]['process']['open_file_descriptors'].to_i
@@ -121,10 +129,12 @@ class ESFileDescriptors < Sensu::Plugin::Check::CLI
121
129
  end
122
130
 
123
131
  def acquire_max_fds
124
- info = if Gem::Version.new(acquire_es_version) >= Gem::Version.new('2.0.0')
132
+ info = if es_version < Gem::Version.new('2.0.0')
133
+ get_es_resource('/_nodes/_local?process=true')
134
+ elsif es_version < Gem::Version.new('5.0.0')
125
135
  get_es_resource('/_nodes/_local/stats?process=true')
126
136
  else
127
- get_es_resource('/_nodes/_local?process=true')
137
+ get_es_resource('/_nodes/_local/stats/process')
128
138
  end
129
139
  begin
130
140
  keys = info['nodes'].keys
@@ -2,7 +2,7 @@ module SensuPluginsElasticsearch
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
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: 2016-11-14 00:00:00.000000000 Z
11
+ date: 2016-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client