sensu-plugins-elasticsearch 1.1.0 → 1.1.1
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/check-es-file-descriptors.rb +13 -3
- data/lib/sensu-plugins-elasticsearch/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: 3f7600762037d73659509576437eef0a316a9d5a
|
|
4
|
+
data.tar.gz: e0cc27195701ab4049c8f6ea15bcb968c390ad92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2801947e4560f554fbddb7bbe44e1bcd9a3c20b83648e10311be52fc7f27eefe3ab54118a5c90fb822e39486c381b3c32f3840f52f603491700597dcbe16830
|
|
7
|
+
data.tar.gz: d81addcbe586df2a477c0096121da1fb5596261b622ab1078877dc4635fe05b7027b3cd896ec6922a792b12bd7a85d5324c72719fe2c302c15ae313562404725
|
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
|
+
## [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.
|
|
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 =
|
|
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
|
|
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
|
|
137
|
+
get_es_resource('/_nodes/_local/stats/process')
|
|
128
138
|
end
|
|
129
139
|
begin
|
|
130
140
|
keys = info['nodes'].keys
|
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.
|
|
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-
|
|
11
|
+
date: 2016-11-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|