sensu-plugins-zfs 0.4.4 → 1.0.1

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: f47decbca0d6b8af127b4737e5c13f36dca9494f
4
- data.tar.gz: 1a36cf31253d05966078f016e1454c2726ace0d7
3
+ metadata.gz: abfc1f08000c99796f34bba4905d998ec6972c79
4
+ data.tar.gz: e15141a24d419564abf7c0562c0442e845972ec2
5
5
  SHA512:
6
- metadata.gz: 12288be843c7d815cb5e5c8a4976ffbd98f4c384efed69d69def7593da94d6814c5b6176482469aa6d87e6a0124028b25daeb2d9ab17d658d952555fbfd19bda
7
- data.tar.gz: d1c2b591c4f921b584299506f3f657b7bb493e18221b89ab8a64dd7354360067b554038f274ded6e93f2bc51bf3dbcb888f9a864b295050f198461a8f0d99aa7
6
+ metadata.gz: 34ebaa3beb2e74711f02a6475d82514a15774b9bcc51a935d1525dadaf30c6e802cf6a271ecb62800e5eb21be6980975725185c4f6c60dba95d011978ca5ab95
7
+ data.tar.gz: 232e33e796e1857aa9cd5375f51c5ca5e36e9fb5cf88510170eec0d48b4f17a220a7bbcca3457278cbce5f279b28f68a1e0b9d698b17e673131c12dfab425d6c
@@ -1,11 +1,21 @@
1
- #! /usr/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require 'sensu-plugin/check/cli'
4
4
  require 'sensu-plugins-zfs'
5
5
 
6
6
  class CheckZPool < Sensu::Plugin::Check::CLI
7
+ option :zpool,
8
+ short: "-z ZPOOL",
9
+ long: "--zpool ZPOOL",
10
+ description: "Name of zpool to check. If omitted, we check all zpools"
11
+
7
12
  def run
8
- zpools = SensuPluginsZFS::ZFS.zpools
13
+ zpools = []
14
+ if config[:zpool]
15
+ zoopls << SensuPluginsZFS::ZPool.new config[:zpool]
16
+ else
17
+ zpools = zpools.SensuPluginsZFS::ZFS.zpools
18
+ end
9
19
  zpools.each do |zp|
10
20
  check_state zp
11
21
  check_vdevs zp
@@ -1,3 +1,3 @@
1
1
  module SensuPluginsZFS
2
- VERSION = "0.4.4"
2
+ VERSION = "1.0.1"
3
3
  end
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.4
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Nørgaard