riemann-aws 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/riemann-elb-metrics +20 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53369cc4951c585ad4512b0f5cb8787fc62afc30
|
4
|
+
data.tar.gz: 1b8d9e2dce92e426dd0f3776caef75b3b2ab25de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8833446b2ac85047da34dbdaa2d2a4e2f8e1fe798b0ec6ad682739dd8af15ef1d7948c551e2a0568a03ef01208b4134b8d263af6eb685ef91612952fd2bf9dce
|
7
|
+
data.tar.gz: 2bd11a72ed228865e285db7bc0ea05e4eeb47633f4a5adac002f35856f99b96c2363217f66dbe91381dea8a92142a0ccb2c142f92765e5b4c4155b87b88f0026
|
data/bin/riemann-elb-metrics
CHANGED
@@ -127,10 +127,13 @@ class Riemann::Tools::ELBMetrics
|
|
127
127
|
# the given time period, values for these metrics will not be recorded in CloudWatch"
|
128
128
|
#next if result.body["GetMetricStatisticsResult"]["Datapoints"].empty? && metric_type =~ /[2345]XX/
|
129
129
|
#
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
130
|
+
if result.body["GetMetricStatisticsResult"]["Datapoints"].empty?
|
131
|
+
standard_metrics[metric_type]['Statistics'].each do |stat_type|
|
132
|
+
event = event(lb, az, metric_type, stat_type, 0.0)
|
133
|
+
report(event)
|
134
|
+
end
|
135
|
+
next
|
136
|
+
end
|
134
137
|
|
135
138
|
# We should only ever have a single data point
|
136
139
|
result.body["GetMetricStatisticsResult"]["Datapoints"][0].keys.sort.each do |stat_type|
|
@@ -139,22 +142,25 @@ class Riemann::Tools::ELBMetrics
|
|
139
142
|
|
140
143
|
unit = result.body["GetMetricStatisticsResult"]["Datapoints"][0]["Unit"]
|
141
144
|
metric = result.body["GetMetricStatisticsResult"]["Datapoints"][0][stat_type]
|
142
|
-
event =
|
143
|
-
event = {
|
144
|
-
host: lb,
|
145
|
-
service: "elb.#{az}.#{metric_type}.#{stat_type}",
|
146
|
-
ttl: 60,
|
147
|
-
description: "#{lb} #{metric_type} #{stat_type} (#{unit})",
|
148
|
-
tags: [ "production", "elb_metrics" ],
|
149
|
-
metric: metric
|
150
|
-
}
|
151
|
-
|
145
|
+
event = event(lb, az, metric_type, stat_type, metric, unit)
|
152
146
|
report(event)
|
153
147
|
end
|
154
148
|
end
|
155
149
|
end
|
156
150
|
end
|
157
151
|
end
|
152
|
+
|
153
|
+
private
|
154
|
+
def event(lb, az, metric_type, stat_type, metric, unit=nil)
|
155
|
+
event = {
|
156
|
+
host: lb,
|
157
|
+
service: "elb.#{az}.#{metric_type}.#{stat_type}",
|
158
|
+
ttl: 60,
|
159
|
+
description: "#{lb} #{metric_type} #{stat_type} (#{unit})",
|
160
|
+
tags: ["elb_metrics"],
|
161
|
+
metric: metric
|
162
|
+
}
|
163
|
+
end
|
158
164
|
end
|
159
165
|
|
160
166
|
Riemann::Tools::ELBMetrics.run
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riemann-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Kingsbury
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riemann-tools
|