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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a379198669d11ab5b82ba4b930924bfc62f43d3a
|
4
|
+
data.tar.gz: a4f46dc543eadc9e2866665decab374b305c7db9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae1c5350e4e8bf732d2564a97c81e77886583b4783cc79ad0b66d5664d1433090d133a70b9ff9afe8580bc3bfdd7f9c7198a4e1ee41c16319843dc7208c5aed4
|
7
|
+
data.tar.gz: d245958674d242b59ef43d12eae67ffe0c33aaf7ab10b402201bf6615893a7b62be3270591e4b9fccb0d535800735f61d973bc6a7f4092495d5400050f154f93
|
@@ -10,7 +10,7 @@
|
|
10
10
|
# plain text
|
11
11
|
#
|
12
12
|
# PLATFORMS:
|
13
|
-
#
|
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 '
|
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
|
-
|
43
|
-
raise
|
44
|
-
|
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
|