sensu-plugins-fsmounts 0.0.2 → 0.0.3

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: 4fd1d6d4810c58376be594fbd7b4121a21a35cfd
4
- data.tar.gz: 0fb6a18306c7d7980ba5e8db03c5f9b620f2d3f1
3
+ metadata.gz: c646c2d6ac9d046f7f618af0da4d41772c626884
4
+ data.tar.gz: c24a587fc4cc1abc978322109298ad302db6a5a3
5
5
  SHA512:
6
- metadata.gz: fdf9dc833b43b85fd91be95d3e69779c2a479288dd60d089eb6540be501524c234901c98d40743e96a105188a82f4ff8dba6fbfc8bef71e4ea4dfd48e397d5cb
7
- data.tar.gz: e6b3a0f1328ab6a957644cf813f7f354b97b30dd7b76073ee25ae20397fff96a3bc6ec58c52b3e69b6b1f9303a89b60b6c2cc38b0dc5d44f0ea8c796525b7e34
6
+ metadata.gz: b85e038836a13a492f0a89dbdb7895fa9ef09d035d704b90114daaf8ca1d3df7db12dbec5a87ad906106781816eecdf5e17cb6abd0fb3e8038f1c82277072a45
7
+ data.tar.gz: 69b2eee29bcd2af54723cbe4f155f232710673ae94adf5f8275c0f5adc0758bd0749c8cb974a49694cffca9620e250b42bead2b574d2457bf2263fc66c383a8b
@@ -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.0.3] - 2016-01-14
9
+ ### Added
10
+ - Added --handlers command line option
11
+
8
12
  ## [0.0.2] - 2016-01-05
9
13
  ### Added
10
14
  - Fixed --warn command line option
data/README.md CHANGED
@@ -16,10 +16,13 @@ Usage: check-fsmounts.rb (options)
16
16
  --ignore-mount <MOUNTPOINT> Comma separated list of mount point(s) to ignore
17
17
  --ignore-mount-regex <MOUNTPOINT>
18
18
  Comma separated list of mount point(s) to ignore (regex)
19
+ --handlers <HANDLERS> Comma separated list of handlers
19
20
  --mount <MOUNTPOINT> Comma separated list of mount point(s) (default: all)
20
21
  --mount-regex <MOUNTPOINT> Comma separated list of mount point(s) (regex)
21
22
  -w, --warn Warn instead of throwing a critical failure
22
23
  ```
23
24
 
25
+ Use the --handlers command line option to specify which handlers you want to use for the generated events.
26
+
24
27
  ## Author
25
28
  Matteo Cerutti - <matteo.cerutti@hotmail.co.uk>
@@ -48,6 +48,12 @@ class CheckFsMounts < Sensu::Plugin::Check::CLI
48
48
  :proc => proc { |a| a.split(',') },
49
49
  :default => []
50
50
 
51
+ option :handlers,
52
+ :description => "Comma separated list of handlers",
53
+ :long => "--handlers <HANDLER>",
54
+ :proc => proc { |s| s.split(',') },
55
+ :default => []
56
+
51
57
  option :warn,
52
58
  :description => "Warn instead of throwing a critical failure",
53
59
  :short => "-w",
@@ -185,22 +191,22 @@ class CheckFsMounts < Sensu::Plugin::Check::CLI
185
191
  end
186
192
 
187
193
  def send_ok(check_name, msg)
188
- event = {"name" => check_name, "status" => 0, "output" => "OK: #{msg}", "handler" => config[:handler]}
194
+ event = {"name" => check_name, "status" => 0, "output" => "#{self.class.name} OK: #{msg}", "handlers" => config[:handlers]}
189
195
  send_client_socket(event.to_json)
190
196
  end
191
197
 
192
198
  def send_warning(check_name, msg)
193
- event = {"name" => check_name, "status" => 1, "output" => "WARNING: #{msg}", "handler" => config[:handler]}
199
+ event = {"name" => check_name, "status" => 1, "output" => "#{self.class.name} WARNING: #{msg}", "handlers" => config[:handlers]}
194
200
  send_client_socket(event.to_json)
195
201
  end
196
202
 
197
203
  def send_critical(check_name, msg)
198
- event = {"name" => check_name, "status" => 2, "output" => "CRITICAL: #{msg}", "handler" => config[:handler]}
204
+ event = {"name" => check_name, "status" => 2, "output" => "#{self.class.name} CRITICAL: #{msg}", "handlers" => config[:handlers]}
199
205
  send_client_socket(event.to_json)
200
206
  end
201
207
 
202
208
  def send_unknown(check_name, msg)
203
- event = {"name" => check_name, "status" => 3, "output" => "UNKNOWN: #{msg}", "handler" => config[:handler]}
209
+ event = {"name" => check_name, "status" => 3, "output" => "#{self.class.name} UNKNOWN: #{msg}", "handlers" => config[:handlers]}
204
210
  send_client_socket(event.to_json)
205
211
  end
206
212
 
@@ -2,7 +2,7 @@ module SensuPluginsFsMounts
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-fsmounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin