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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bd59ab1d27f84e31a00ef27bcecf821ae95f68c
4
- data.tar.gz: c636a2763c6accfc332344f8d0cc339075e5c753
3
+ metadata.gz: d22d16a3915bb7935f33032d91b7369bee56e107
4
+ data.tar.gz: 48b3c276edbde05104aa2ffa5faf8535898bdbcd
5
5
  SHA512:
6
- metadata.gz: 6e8adf4c14d2eab8145f5b27f11ae4623bccbca1de629efd810544d7026ecf3b7791912c887593fb6dbe3924a1f8b611f270b0ee7b3a9d29134874d17f051136
7
- data.tar.gz: c50bc0953dc9281195f5cba9b168fc5ed9eebe6996c6aa0532bbc4152d71a7245354fb6535409880310030317e78b4db0abc035e5f14a5a9c920225bff640e47
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
- case
37
- when pending_count == 0
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
- when pending_count >config[:warn_value].to_i
39
+ elsif pending_count >= config[:warn_value].to_i
42
40
  warning "Message Center Pending Count is: #{pending_count} "
43
41
  else
44
- warning "ODD: we did not match any cases for alerts, this should not happen, Message Center Pending Count is: #{pending_count} "
42
+ ok "Message Center Pending Count is: #{pending_count} "
45
43
  end
46
44
 
45
+
47
46
  end
48
47
 
49
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumo-check-sumo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr. Ogg