sensu-plugins-elasticsearch 0.3.1 → 0.3.2

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: 7274d48632cbac489016fcc28073665e0221bd81
4
- data.tar.gz: 3786345e742f828052e54fe80c1d2eb81c9b0cbe
3
+ metadata.gz: 8bd1578a35f585df777a0e1c90e333d6d2a5463c
4
+ data.tar.gz: b702fb67209f601680305df43988c8085e47e643
5
5
  SHA512:
6
- metadata.gz: 660cbc6632fdc418a7dbc48525cd0b517ad7d7556ea5e8f4c87dc490993944c126ba1b74d82a99264eed7516b868726b56cf22b578be917b7e367806928a58eb
7
- data.tar.gz: 5995bf40185ee2bb37007f918c88dd8d8cbdef86062bbf38f4d7f53ee018f20a1b026a9d6ee62d9388264251753c260139fddc1def8c6bf3c50e6cd84d5d70e5
6
+ metadata.gz: 46c95cbfb1fa1798a2f42296cd00e105eac50b0a7b1450563dab5296a36a28890bc754e197253e2df924726fb17203c3083cab84de90af2f877b48658ab8d82b
7
+ data.tar.gz: 057d2d45e35b9b085958a15186032b3152c4bdf8d80fe6b18bb5f1710cf1b70bb2167eb42df171327be5686f0b71db0f53b32dd1603a4391b0e464049592a935
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- ���� �۩|e��
2
- �l/7�/��ykW�j�䆏�ˆ��oⰵ�t�ﳺ;7M��׸�2��u{������Hf���G��Me��#B/�@�� |��)�?�/�ڃ��:ii�� ���� [������8��@�ǧ�����Ô�o�p�~��L���PKc��YD�8ٜ�)��0���X^-���������]L5I ��.��Na<��/�Pη��/SXUJ��O n�ÁE0���8Pu/����7�����O�+
1
+ 1F����d���A# �9��U�=#ۋ���80$5f7�4���^��A������Lt���;�i��W�
2
+ gQ@������L�&�/�l���D[��*���=C�'�f�gC��`�6�����q,`ґI� �.3�^�[v�i��5K�u\1+��W�\�0$m(��XO�>��b�q��o�Lϱ���D>`��cȼ���,Gu�@{b���3*!��%�$�G�Dc�X�1��r�
3
+ ΄�e��*X�����z�C �Xv�(
data.tar.gz.sig CHANGED
Binary file
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
+ ## [0.3.2] - 2015-12-29
9
+ ### Changed
10
+ - Update metrics-es-node.rb for Elasticsearch 2.0
11
+
8
12
  ## [0.3.1] - 2015-12-29
9
13
  ### Changed
10
14
  - Update metrics-es-node.rb to use version checks consistent with other metrics
@@ -86,7 +86,9 @@ class ESMetrics < Sensu::Plugin::Metric::CLI::Graphite
86
86
  end
87
87
 
88
88
  def run
89
- if Gem::Version.new(acquire_es_version) >= Gem::Version.new('1.0.0')
89
+ es_version = Gem::Version.new(acquire_es_version)
90
+
91
+ if es_version >= Gem::Version.new('1.0.0')
90
92
  ln = get_es_resource('/_nodes/_local')
91
93
  stats = get_es_resource('/_nodes/_local/stats')
92
94
  else
@@ -98,7 +100,11 @@ class ESMetrics < Sensu::Plugin::Metric::CLI::Graphite
98
100
  node = stats['nodes'].values.first
99
101
  node['jvm']['mem']['heap_max_in_bytes'] = ln['nodes'].values.first['jvm']['mem']['heap_max_in_bytes']
100
102
  metrics = {}
101
- metrics['os.load_average'] = node['os']['load_average'][0]
103
+ if es_version >= Gem::Version.new('2.0.0')
104
+ metrics['os.load_average'] = node['os']['load_average']
105
+ else
106
+ metrics['os.load_average'] = node['os']['load_average'][0]
107
+ end
102
108
  metrics['os.mem.free_in_bytes'] = node['os']['mem']['free_in_bytes']
103
109
  metrics['process.mem.resident_in_bytes'] = node['process']['mem']['resident_in_bytes']
104
110
  metrics['jvm.mem.heap_used_in_bytes'] = node['jvm']['mem']['heap_used_in_bytes']
@@ -2,7 +2,7 @@ module SensuPluginsElasticsearch
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-12-29 00:00:00.000000000 Z
33
+ date: 2015-12-30 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rest-client
metadata.gz.sig CHANGED
Binary file