sensu-plugins-zfs 0.4.1 → 0.4.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: 31b1145f4ba5bcb1487f1530403c2bb3ab65ecda
4
- data.tar.gz: 50a9c051e010d6b0d8be2dc6ea00b840747301b8
3
+ metadata.gz: af3181bd452635facbc5db5e3f8b0462fd45bb23
4
+ data.tar.gz: e061930832e9e5437743fa3e47fa96c12c9f6954
5
5
  SHA512:
6
- metadata.gz: 0802f340495362dc2586cd94e0f494a06c1b99f2ea9cd423418f6e0094c23d7a920cc4324cf3a14c621e48f69c44c9e8bdf4942136f4cae7bcfb3415241cdf77
7
- data.tar.gz: b40fd5ebf22b28949248d5a4534d40bbef183abd6a1a98e001395f9dd3324f288d4caf8f585c56c88570ddbdbc363a8df7f4072b22686805c5f98959b280857c
6
+ metadata.gz: 08fc2e22d2351e9459ad0e46131495c4dcfb4c8ee9a98bf670a1abb2e17a518200ae231ed330043a9c292a3fd2f36bc58548c6a5a4b0d2a7df8fe8b844413318
7
+ data.tar.gz: ccafea25f6d9bc95e1cae8e0a24b0b9ab85b4a88266bd30ef02d6a718d5c26db4fdd424db234a7f01e80dafad0c9b89a4476e2920c9e428eac575562e54da768
@@ -1,3 +1,3 @@
1
1
  module SensuPluginsZFS
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -13,7 +13,7 @@ module SensuPluginsZFS
13
13
  def initialize(name)
14
14
  @name = name
15
15
  @state = %x[sudo zpool status #{name} | grep '^ state: ' | cut -d ' ' -f 3].strip
16
- @vdevs = create_vdevs
16
+ @vdevs = create_vdevs name
17
17
  end
18
18
 
19
19
  def ok?
@@ -22,8 +22,8 @@ module SensuPluginsZFS
22
22
 
23
23
  private
24
24
 
25
- def create_vdevs
26
- cmd_out = %x[sudo zpool status #{@name} | grep ONLINE | grep -v state | awk '{print $1 " " $2 " " $3 " " $4 " " $5}']
25
+ def create_vdevs(name)
26
+ cmd_out = %x[sudo zpool status #{name} | grep ONLINE | grep -v state | awk '{print $1 " " $2 " " $3 " " $4 " " $5}']
27
27
  cmd_out.lines('').map do |l|
28
28
  arr = l.strip.split(' ')
29
29
  VDev.new(self, arr[0], arr[1], arr[2].to_i, arr[3].to_i, arr[4].to_i)
@@ -35,8 +35,8 @@ module SensuPluginsZFS
35
35
  attr_reader :zpool, :name, :read, :write, :chksum
36
36
  def initialize(zpool, name, state, read, write, chksum)
37
37
  @zpool = zpool
38
- @state = state
39
38
  @name = name
39
+ @state = state
40
40
  @read = read
41
41
  @write = write
42
42
  @chksum = chksum
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-zfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Nørgaard