sumo-check-sumo 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sumo-check-message-center.rb +5 -6
- 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: d22d16a3915bb7935f33032d91b7369bee56e107
|
4
|
+
data.tar.gz: 48b3c276edbde05104aa2ffa5faf8535898bdbcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20eabaa30e7141c21eb85488e75156cfde8bea1bee721724f4ed90a3aa392ee42d1a1f8f95d763bbced5204e1c295178dc4f150c1e704bc6d888c171ff62a276
|
7
|
+
data.tar.gz: d671e68f6deba3eea9107357b6122869d2db09e3e8722a5df080dc497a4982e7053299ec849aa0d74d4ec353ceb2e7a4159b21a16b69d7bb177ff87be03fd00b
|
@@ -33,17 +33,16 @@ class SumoMessageCenterCheck < Sensu::Plugin::Check::CLI
|
|
33
33
|
# pending_count = db.query("SELECT count(id) FROM MessageCenterEmail where state='pending' and scheduled_for <= NOW() - INTERVAL #{config[:interval_value].to_i} MINUTE;").first["count(id)"].to_i
|
34
34
|
pending_count = db.query("SELECT count(id) FROM MessageCenterEmail where state='pending';").first["count(id)"].to_i
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
ok "Message Center Pending Count is: #{pending_count} "
|
39
|
-
when pending_count >config[:critical_value].to_i
|
36
|
+
|
37
|
+
if pending_count >= config[:critical_value].to_i
|
40
38
|
critical "Message Center Pending Count is: #{pending_count} "
|
41
|
-
|
39
|
+
elsif pending_count >= config[:warn_value].to_i
|
42
40
|
warning "Message Center Pending Count is: #{pending_count} "
|
43
41
|
else
|
44
|
-
|
42
|
+
ok "Message Center Pending Count is: #{pending_count} "
|
45
43
|
end
|
46
44
|
|
45
|
+
|
47
46
|
end
|
48
47
|
|
49
48
|
end
|