sensu-plugins-prometheus-checks 3.1.2 → 3.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f78ebc8214d712661fec4c057d47ce8c3b97335e
|
4
|
+
data.tar.gz: 9de04c81fc34dbc86f1338fa004bbb74980c5324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c6dc74e048e271ffe6457130910f4a24391ce727643e29be5bcfe119ddce3ee288a5285d385443f911f64f5d8b8707480af60d2c67ff387c038455e2683678
|
7
|
+
data.tar.gz: e5b7b5b69e4f353eb6aadeb2a626b746e33a4a6b3578d820f11efd7d043db7828f653f3c996c1679e70479ca98b4111dd068f777eebb1fb54d9155bee95b3529
|
@@ -7,6 +7,9 @@ module Sensu
|
|
7
7
|
# Given current result, warning and critical levels, it will return a
|
8
8
|
# integer with the current level, zero is success.
|
9
9
|
def evaluate(result, warn, crit)
|
10
|
+
# If no result was given return an unknown since converting nil to a float gives 0.0 :(
|
11
|
+
return 3 if result.nil?
|
12
|
+
|
10
13
|
result = result.to_f
|
11
14
|
warn = warn.to_f
|
12
15
|
crit = crit.to_f
|
@@ -77,6 +77,7 @@ module Sensu
|
|
77
77
|
percent = result['value'][1].to_i
|
78
78
|
results << { 'output' => "#{q['name'].capitalize}: #{mountpoint}, Usage: #{percent}% |#{q['name']}=#{percent}",
|
79
79
|
'name' => "#{q['name']}_#{disk_name}",
|
80
|
+
'value' => percent,
|
80
81
|
'source' => hostname }
|
81
82
|
end
|
82
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-prometheus-checks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Russell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.6.
|
195
|
+
rubygems_version: 2.6.13
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Sensu plugin for monitoring servers by querying Prometheus
|