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 +4 -4
- data/bin/sumo-SumoMailEmail-metrics.rb +5 -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: 17bab321f72565aa0b21d7d1d1016fd5c75d3acd
|
4
|
+
data.tar.gz: d35b5d6306c8f5241055c84dd0dfe9d5ace770a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|