sensu-plugins-elasticsearch 1.1.2 → 1.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90fbda760f74eae51619a41d8da2201f3f62caa9
4
- data.tar.gz: 647f75c70da606f865758926e1f25b2572b06f61
3
+ metadata.gz: 4cf660c00d0f12fd0495a16b3bae4720b6116ff1
4
+ data.tar.gz: 8ada34c80777d6f0ec07b17a22de21f9d34721f1
5
5
  SHA512:
6
- metadata.gz: d7629bfa0302befb14df1c43c363f01f41be65c4981168c01e978754b173f5038ae5457b84768ce76fac9ab7ce0b128634ef94e5f1a433811e859d2bde456d67
7
- data.tar.gz: db8e5a2d01275a48dbb84d6bd6cd592a7a5ffc6d7cf8ef202fb01fadb6286e2de99cdfdedf985e9f6eebc307b081f9e8a516b891b51f45d1834752fa55fc7d8b
6
+ metadata.gz: 57480b7dc012d422bbf3bd6a306e257a9139cded4c7ab93465244c3e5ff53cae8cdd034f6e03100c9257d35467a7b01b199522f02765e1987b2c28debe34f0a5
7
+ data.tar.gz: 8ee4b65d749dc139685b940487ec05cfab072e211c7d0d6e03db220f3cb9b30d74ffa23f86da2772070d43e2be440f596ef6446a07c75b3b3ab5da653b2bbac2
@@ -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.3] - 2017-01-04
9
+ ### Fixed
10
+ - metrics-es-cluster/metrics-es-node-graphite.rb: Fix Elasticsearch 5.0 compatability (@terjesannum)
11
+
8
12
  ## [1.1.2] - 2016-12-29
9
13
  ### Fixed
10
14
  - Fixed metrics-es-node-graphite.rb was not compatible with Elasticsearch 5.0 (@woqer)
@@ -131,7 +135,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
131
135
  ### Added
132
136
  - initial release
133
137
 
134
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.2...HEAD
138
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.3...HEAD
139
+ [1.1.3]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.2...1.1.3
135
140
  [1.1.2]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.1...1.1.2
136
141
  [1.1.1]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.1.0...1.1.1
137
142
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.0.0...1.1.0
@@ -117,7 +117,11 @@ class ESClusterMetrics < Sensu::Plugin::Metric::CLI::Graphite
117
117
  end
118
118
 
119
119
  def master?
120
- state = get_es_resource('/_cluster/state?filter_routing_table=true&filter_metadata=true&filter_indices=true')
120
+ state = if Gem::Version.new(acquire_es_version) >= Gem::Version.new('3.0.0')
121
+ get_es_resource('/_cluster/state/master_node')
122
+ else
123
+ get_es_resource('/_cluster/state?filter_routing_table=true&filter_metadata=true&filter_indices=true')
124
+ end
121
125
  local = if Gem::Version.new(acquire_es_version) >= Gem::Version.new('1.0.0')
122
126
  get_es_resource('/_nodes/_local')
123
127
  else
@@ -152,11 +152,11 @@ class ESNodeGraphiteMetrics < Sensu::Plugin::Metric::CLI::Graphite
152
152
  es_version = Gem::Version.new(acquire_es_version)
153
153
 
154
154
  if es_version >= Gem::Version.new('3.0.0')
155
- stats_query_array = %w(indices http network transport thread_pool)
155
+ stats_query_array = %w(indices http transport)
156
156
  stats_query_array.push('jvm') if jvm_stats == true
157
157
  stats_query_array.push('os') if os_stat == true
158
158
  stats_query_array.push('process') if process_stats == true
159
- stats_query_array.push('tp_stats') if tp_stats == true
159
+ stats_query_array.push('thread_pool') if tp_stats == true
160
160
  stats_query_array.push('fs') if fs_stats == true
161
161
  stats_query_string = stats_query_array.join(',')
162
162
  elsif es_version >= Gem::Version.new('1.0.0')
@@ -2,7 +2,7 @@ module SensuPluginsElasticsearch
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- PATCH = 2
5
+ PATCH = 3
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.2
4
+ version: 1.1.3
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-12-30 00:00:00.000000000 Z
11
+ date: 2017-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client