riemann-tools 1.3.0 → 1.4.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
  SHA256:
3
- metadata.gz: f5a792bfad2f53aed8b440a4077dfe9cb062fa93634ca2a89d6a1ee0d95b9d58
4
- data.tar.gz: 3a66ce44d7ce2c1c092e2730d7648fb2175dc3c145d227a1800dc67d1d9aec8d
3
+ metadata.gz: 9a03d7a3dbe3175c3c9e3ab9af1ff80cf37affafed4af3f8b8c84dd11a91b2d9
4
+ data.tar.gz: e789e77e2ceaac35acc00fc3d4136497d3410056d22d4ea1f5c0ab884b05f967
5
5
  SHA512:
6
- metadata.gz: 70e5dd74454d5306a10ced4e20428b900e8ef94d8b1c245db5d10be2460342e1b8b9de10de789091a87c06b2e9131dfb427824353ac25ca1435d84b0b15dd99a
7
- data.tar.gz: 38c2b16254f90c75badf6f0d44cd99d7b5cf880dbabe4e985248d58a90f2c34ac87cd4da470b915d459a53bae7bcfd0628464c917893a4cdac6d578987d85af3
6
+ metadata.gz: 599e8b4b8923501cad11bce865c3ba9aa6420411d9e515fcd33b349308c3f8ee6200d8db648ad0a8ce1b701fe88e1858dae26a800fb599f5297c7a5175e58f5b
7
+ data.tar.gz: a34dbd525e45f4c71ad3fec639f81d339848034aeede60efa6de5081e28d1afd6bc18ceb39d67c4dd223d04a2dba006cc74ddc6f288ce612ea16d454577d6e1c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.4.0](https://github.com/riemann/riemann-tools/tree/v1.4.0) (2022-08-30)
4
+
5
+ [Full Changelog](https://github.com/riemann/riemann-tools/compare/v1.3.0...v1.4.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Improve zpool state reporting [\#239](https://github.com/riemann/riemann-tools/pull/239) ([smortex](https://github.com/smortex))
10
+
11
+ **Fixed bugs:**
12
+
13
+ - Fix zpool/md informational messages reporting [\#238](https://github.com/riemann/riemann-tools/pull/238) ([smortex](https://github.com/smortex))
14
+ - Fix detection of degraded zpool [\#237](https://github.com/riemann/riemann-tools/pull/237) ([smortex](https://github.com/smortex))
15
+
3
16
  ## [v1.3.0](https://github.com/riemann/riemann-tools/tree/v1.3.0) (2022-08-29)
4
17
 
5
18
  [Full Changelog](https://github.com/riemann/riemann-tools/compare/v1.2.0...v1.3.0)
@@ -20,13 +20,13 @@ module Riemann
20
20
 
21
21
  report(
22
22
  service: 'mdstat',
23
- message: status,
23
+ description: status,
24
24
  state: state,
25
25
  )
26
26
  rescue Errno::ENOENT => e
27
27
  report(
28
28
  service: 'mdstat',
29
- message: e.message,
29
+ description: e.message,
30
30
  state: 'critical',
31
31
  )
32
32
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Riemann
4
4
  module Tools # :nodoc:
5
- VERSION = '1.3.0'
5
+ VERSION = '1.4.0'
6
6
  end
7
7
  end
@@ -12,15 +12,26 @@ module Riemann
12
12
  def tick
13
13
  output, status = Open3.capture2e('zpool status -x')
14
14
 
15
+ state = if status.success?
16
+ case output
17
+ when "all pools are healthy\n" then 'ok'
18
+ when /state: (DEGRADED|FAULTED)/ then 'critical'
19
+ else
20
+ 'warning'
21
+ end
22
+ else
23
+ 'critical'
24
+ end
25
+
15
26
  report(
16
27
  service: 'zpool health',
17
- message: output,
18
- state: status.success? ? 'ok' : 'critical',
28
+ description: output,
29
+ state: state,
19
30
  )
20
31
  rescue Errno::ENOENT => e
21
32
  report(
22
33
  service: 'zpool health',
23
- message: e.message,
34
+ description: e.message,
24
35
  state: 'critical',
25
36
  )
26
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kingsbury
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-29 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -321,7 +321,7 @@ metadata:
321
321
  homepage_uri: https://github.com/aphyr/riemann-tools
322
322
  source_code_uri: https://github.com/aphyr/riemann-tools
323
323
  changelog_uri: https://github.com/aphyr/riemann-tools
324
- post_install_message:
324
+ post_install_message:
325
325
  rdoc_options: []
326
326
  require_paths:
327
327
  - lib
@@ -336,8 +336,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
336
336
  - !ruby/object:Gem::Version
337
337
  version: '0'
338
338
  requirements: []
339
- rubygems_version: 3.3.19
340
- signing_key:
339
+ rubygems_version: 3.2.5
340
+ signing_key:
341
341
  specification_version: 4
342
342
  summary: Utilities which submit events to Riemann.
343
343
  test_files: []