sensu-plugins-cpu-usage 0.0.1 → 0.0.2
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/CHANGELOG.md +4 -0
- data/bin/check-cpu-usage.rb +4 -4
- data/lib/sensu-plugins-cpu-usage/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4bbb7f54c9a63a1ff45e30b799a8c4ab426a8d6
|
4
|
+
data.tar.gz: e24bc9a4d898c053ce40a60835ee778b9c429929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c65cff28ffc4d7b465471c50139ce6e050b54d4611ce3c617113fb4efe5fed7159d82343d30e5d7a16fb02ee67b88ebdf886f7620339560964a5f1140dec5a
|
7
|
+
data.tar.gz: 412251cb5f294fbaa33d26dfe806387be7406a1dc4162e6912b637d79bafc6ce2289a3ddcf74d75ff785be5ba894a2ac9b8330558b4a1a5daf80a041206bac84
|
data/CHANGELOG.md
CHANGED
data/bin/check-cpu-usage.rb
CHANGED
@@ -143,10 +143,10 @@ class CheckCpuUsage < Sensu::Plugin::Check::CLI
|
|
143
143
|
check_name = "cpu-usage-#{metric}"
|
144
144
|
|
145
145
|
if config["warn_#{metric}".to_sym] and config["crit_#{metric}".to_sym]
|
146
|
-
if
|
147
|
-
send_critical(check_name, "CPU #{metric} time is too high - Current: #{value}% (>= #{config["crit_#{metric}".to_sym]}%)" if value >= config["crit_#{metric}".to_sym])
|
148
|
-
elsif
|
149
|
-
send_warning(check_name, "High CPU #{metric} time - Current: #{value}% (>= #{config["warn_#{metric}".to_sym]}%)" if value >= config["warn_#{metric}".to_sym])
|
146
|
+
if value >= config["crit_#{metric}".to_sym]
|
147
|
+
send_critical(check_name, "CPU #{metric} time is too high - Current: #{value}% (>= #{config["crit_#{metric}".to_sym]}%)") if value >= config["crit_#{metric}".to_sym])
|
148
|
+
elsif value >= config["warn_#{metric}".to_sym]
|
149
|
+
send_warning(check_name, "High CPU #{metric} time - Current: #{value}% (>= #{config["warn_#{metric}".to_sym]}%)") if value >= config["warn_#{metric}".to_sym])
|
150
150
|
else
|
151
151
|
send_ok(check_name, "CPU #{metric} time is normal - Current: #{value}% (<= #{config["warn_#{metric}".to_sym]}%)")
|
152
152
|
end
|