continuent-tools-monitoring 0.1.0 → 0.5.0
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 +4 -4
- data/lib/continuent-tools-nagios-monitor.rb +28 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbde67f19279c52f1ca6a25d818a06ee35802abf
|
4
|
+
data.tar.gz: d9803a1bd6f4822a9b0b3e96f81b85d46b582a5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a0d02fe2c1111c74b676f69fac7b61dab28d6fbac1cab2d5adcfe743a8a6bf6bb27570fc2f2752ba4f166e9b90801664eeee083e19c7a15a3ddc7b64c1198e2
|
7
|
+
data.tar.gz: 2627039dcbe72cb0a6c1828735793ec4e304d14eab5dd687a3208353c67768e3b5f15d973e193f1a0a684577ed005018c9067d9075c73a365f8267ce512fd828
|
@@ -27,6 +27,34 @@ module TungstenNagiosMonitor
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
# Is the given value above the critical threshold
|
31
|
+
def is_critical?(value)
|
32
|
+
unless value.to_s() =~ /^[0-9\.]+$/
|
33
|
+
unknown("Unable to compare a non-numeric value : #{value}")
|
34
|
+
end
|
35
|
+
|
36
|
+
check = value.to_s().to_f()
|
37
|
+
if check >= opt(:critical_level).to_f()
|
38
|
+
true
|
39
|
+
else
|
40
|
+
false
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Is the given value above the warning threshold
|
45
|
+
def is_warning?(value)
|
46
|
+
unless value.to_s() =~ /^[0-9\.]+$/
|
47
|
+
unknown("Unable to compare a non-numeric value : #{value}")
|
48
|
+
end
|
49
|
+
|
50
|
+
check = value.to_s().to_f()
|
51
|
+
if check >= opt(:warning_level).to_f()
|
52
|
+
true
|
53
|
+
else
|
54
|
+
false
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
30
58
|
# Build an output string when the value has passed
|
31
59
|
def build_ok_message(value)
|
32
60
|
"Value is OK (#{value})"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: continuent-tools-monitoring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Continuent
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: continuent-tools-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.5.0
|
27
27
|
description:
|
28
28
|
email: info@continuent.com
|
29
29
|
executables:
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.0.
|
60
|
+
rubygems_version: 2.0.14
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: Continuent Tungsten tools core monitoring tools
|