sensu-plugins-uninterruptible-sleep 0.1.0 → 0.1.1

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: aa8f486c9f5d1f72ec035604fbb61c7e77f406ab
4
- data.tar.gz: 928b7fca178e96f500e8b7700a73e075ec2d8962
3
+ metadata.gz: a379198669d11ab5b82ba4b930924bfc62f43d3a
4
+ data.tar.gz: a4f46dc543eadc9e2866665decab374b305c7db9
5
5
  SHA512:
6
- metadata.gz: 3bccbeced417bb07e3392ab5c15a6c17276d1cd23dd8328109098051fe359129934a262757c8adec8d95afaa29d9ef368c0e526335a50316695ed553af5c832c
7
- data.tar.gz: 133a376fdaa3637469dac6afc0e7c525eadb435c86fd29656370edbc6e0ff7fdf269337caa8ccf43256b7d4f77d0e081de04752af09e4842ea892a4987bf9eef
6
+ metadata.gz: ae1c5350e4e8bf732d2564a97c81e77886583b4783cc79ad0b66d5664d1433090d133a70b9ff9afe8580bc3bfdd7f9c7198a4e1ee41c16319843dc7208c5aed4
7
+ data.tar.gz: d245958674d242b59ef43d12eae67ffe0c33aaf7ab10b402201bf6615893a7b62be3270591e4b9fccb0d535800735f61d973bc6a7f4092495d5400050f154f93
@@ -10,7 +10,7 @@
10
10
  # plain text
11
11
  #
12
12
  # PLATFORMS:
13
- # Linux
13
+ # POSIX
14
14
  #
15
15
  # DEPENDENCIES:
16
16
  # gem: sensu-plugin
@@ -21,7 +21,7 @@
21
21
  #
22
22
 
23
23
  require 'sensu-plugin/check/cli'
24
- require 'English'
24
+ require 'open3'
25
25
 
26
26
  class CheckUninterruptibleSleep < Sensu::Plugin::Check::CLI
27
27
  option :warning_threshold,
@@ -39,9 +39,9 @@ class CheckUninterruptibleSleep < Sensu::Plugin::Check::CLI
39
39
  proc: proc(&:to_i)
40
40
 
41
41
  def process_states
42
- output = `ps -h -o s`
43
- raise 'execution of `ps` command failed' unless $CHILD_STATUS.exitstatus.zero?
44
- output.lines
42
+ stdout, stderr, status = Open3.capture3('ps', '-h', '-o', 's')
43
+ raise "ps command failed: #{stderr}" unless status.success?
44
+ stdout.lines
45
45
  end
46
46
 
47
47
  def run
@@ -2,7 +2,7 @@ module SensuPluginsUninterruptibleSleep
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-uninterruptible-sleep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors