sumo-check-sumo 0.0.28 → 0.0.29

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: 59cf38cc84eb6fe24f1253c8ac32a9899cc79057
4
- data.tar.gz: d9ada7d3bf6f5236947e3d9c96d37fc11443c042
3
+ metadata.gz: 17bab321f72565aa0b21d7d1d1016fd5c75d3acd
4
+ data.tar.gz: d35b5d6306c8f5241055c84dd0dfe9d5ace770a0
5
5
  SHA512:
6
- metadata.gz: a08160a01084cff3d00eb6b5187e2cf08dea780e358e776fbfa5ae5ca364fa9e7789677f2b1cd9f2a6b427ce450198447e048f8f212a6bb961ecab2d97d8d5b9
7
- data.tar.gz: dcd20220e7ff48c1403fb85e63040c6b80ad67176fd597ab27efc10fea268b8f272b9ec1d4823f32851adfb008034c8b95598f7ad1e5a69aae532c7812071610
6
+ metadata.gz: 9a816332cd6c87132387f283d2a4432d3acf53e9595aff4669393472115b3d01b2e0114f6ab2f79ae5e225602934de79171b97965b907b1e211a0ee0e3816385
7
+ data.tar.gz: 1204dd643a521eeea41c17c9ef6df3728dfd2fa845ba03230131ac22d913ed950fec0bc18fa9aa9886e1f94868676c43a66c3b137caaa1caf1ad6e8fbebd62e0
@@ -17,7 +17,11 @@ class SumoMessageCenterMetrics < Sensu::Plugin::Metric::CLI::Graphite
17
17
  list_types = db.query("select DISTINCT email_list_type from SumoMailEmail;",:as => :array).to_a.flatten
18
18
  list_types.each do |type|
19
19
  metrics.each do |m|
20
- result = db.query("SELECT count(id) FROM SumoMailEmail where state='#{m}' and email_list_type='#{type}' and scheduled_for <= NOW() - INTERVAL 10 MINUTE;")
20
+ if type == "pending"
21
+ result = db.query("SELECT count(id) FROM SumoMailEmail where state='#{m}' and email_list_type='#{type}' and scheduled_for <= NOW() - INTERVAL 10 MINUTE;")
22
+ else
23
+ result = db.query("SELECT count(id) FROM SumoMailEmail where state='#{m}' and email_list_type='#{type}';")
24
+ end
21
25
  if result.count > 0
22
26
  output "#{check_prefix_name}.#{type}.#{m}.count".tr(' ', '_'),result.first["count(id)"].to_i,Time.now.to_i
23
27
  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.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr. Ogg