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 +4 -4
- data/lib/sensu-plugins-zfs/version.rb +1 -1
- data/lib/sensu-plugins-zfs/zpool.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af3181bd452635facbc5db5e3f8b0462fd45bb23
|
4
|
+
data.tar.gz: e061930832e9e5437743fa3e47fa96c12c9f6954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08fc2e22d2351e9459ad0e46131495c4dcfb4c8ee9a98bf670a1abb2e17a518200ae231ed330043a9c292a3fd2f36bc58548c6a5a4b0d2a7df8fe8b844413318
|
7
|
+
data.tar.gz: ccafea25f6d9bc95e1cae8e0a24b0b9ab85b4a88266bd30ef02d6a718d5c26db4fdd424db234a7f01e80dafad0c9b89a4476e2920c9e428eac575562e54da768
|
@@ -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 #{
|
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
|