funktor 0.7.13 → 0.7.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/funktor-testapp/funktor_config/resources/cloudwatch_dashboard.yml +238 -727
- data/funktor-testapp/funktor_init.yml +3 -3
- data/lib/funktor/cli/init.rb +16 -0
- data/lib/funktor/cli/templates/funktor_config/resources/cloudwatch_dashboard.yml +29 -373
- data/lib/funktor/version.rb +1 -1
- metadata +1 -1
data/lib/funktor/cli/init.rb
CHANGED
@@ -141,6 +141,22 @@ module Funktor
|
|
141
141
|
|
142
142
|
private
|
143
143
|
|
144
|
+
def prioritized_workers
|
145
|
+
if primary_workers == app_worker_names
|
146
|
+
app_worker_names
|
147
|
+
else
|
148
|
+
primary_workers + non_primary_workers
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
def non_primary_workers
|
153
|
+
if primary_workers == app_worker_names
|
154
|
+
app_worker_names
|
155
|
+
else
|
156
|
+
app_worker_names - primary_workers
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
144
160
|
def primary_workers
|
145
161
|
funktor_config["primaryWorkers"] || app_worker_names
|
146
162
|
end
|
@@ -21,298 +21,46 @@ Resources:
|
|
21
21
|
},
|
22
22
|
<% current_y += 3 %>
|
23
23
|
|
24
|
-
{ <% "
|
25
|
-
"height": 4,
|
26
|
-
"width": 12,
|
27
|
-
"y": <%= current_y %>,
|
28
|
-
"x": 0,
|
29
|
-
"type": "metric",
|
30
|
-
"properties": {
|
31
|
-
"metrics": [
|
32
|
-
<%- primary_workers.each do |worker_name| -%>
|
33
|
-
[ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == primary_workers.last ? "" : "," %>
|
34
|
-
<%- end -%>
|
35
|
-
],
|
36
|
-
"view": "timeSeries",
|
37
|
-
"stacked": false,
|
38
|
-
"region": "us-east-1",
|
39
|
-
"title": "Processed Jobs By Worker",
|
40
|
-
"period": 60,
|
41
|
-
"stat": "Sum"
|
42
|
-
}
|
43
|
-
},
|
44
|
-
{ <% "p90 By Worker" %>
|
45
|
-
"height": 4,
|
46
|
-
"width": 12,
|
47
|
-
"y": <%= current_y %>,
|
48
|
-
"x": 12,
|
49
|
-
"type": "metric",
|
50
|
-
"properties": {
|
51
|
-
"metrics": [
|
52
|
-
<%- primary_workers.each do |worker_name| -%>
|
53
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == primary_workers.last ? "" : "," %>
|
54
|
-
<%- end -%>
|
55
|
-
],
|
56
|
-
"view": "timeSeries",
|
57
|
-
"stacked": false,
|
58
|
-
"region": "us-east-1",
|
59
|
-
"stat": "p90",
|
60
|
-
"period": 60,
|
61
|
-
"title": "p90 by Worker"
|
62
|
-
}
|
63
|
-
},
|
64
|
-
<% current_y += 3 %>
|
65
|
-
|
66
|
-
{ <% "Failed Jobs By Worker" %>
|
67
|
-
"height": 4,
|
68
|
-
"width": 12,
|
69
|
-
"y": <%= current_y %>,
|
70
|
-
"x": 0,
|
71
|
-
"type": "metric",
|
72
|
-
"properties": {
|
73
|
-
"metrics": [
|
74
|
-
<%- primary_workers.each do |worker_name| -%>
|
75
|
-
[ "${self:custom.funktor.DashboardNamespace}", "failed", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == primary_workers.last ? "" : "," %>
|
76
|
-
<%- end -%>
|
77
|
-
],
|
78
|
-
"view": "timeSeries",
|
79
|
-
"stacked": false,
|
80
|
-
"region": "us-east-1",
|
81
|
-
"title": "Failed Jobs By Worker",
|
82
|
-
"period": 60,
|
83
|
-
"stat": "Sum"
|
84
|
-
}
|
85
|
-
},
|
86
|
-
{ <% "p50 By Worker" %>
|
87
|
-
"height": 4,
|
88
|
-
"width": 12,
|
89
|
-
"y": <%= current_y %>,
|
90
|
-
"x": 12,
|
91
|
-
"type": "metric",
|
92
|
-
"properties": {
|
93
|
-
"metrics": [
|
94
|
-
<%- primary_workers.each do |worker_name| -%>
|
95
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == primary_workers.last ? "" : "," %>
|
96
|
-
<%- end -%>
|
97
|
-
],
|
98
|
-
"view": "timeSeries",
|
99
|
-
"stacked": false,
|
100
|
-
"region": "us-east-1",
|
101
|
-
"stat": "p50",
|
102
|
-
"period": 60,
|
103
|
-
"title": "p50 by Worker"
|
104
|
-
}
|
105
|
-
},
|
106
|
-
<% current_y += 3 %>
|
107
|
-
|
108
|
-
{ <% "Processed Jobs By Queue" %>
|
109
|
-
"height": 4,
|
110
|
-
"width": 12,
|
111
|
-
"y": <%= current_y %>,
|
112
|
-
"x": 0,
|
113
|
-
"type": "metric",
|
114
|
-
"properties": {
|
115
|
-
"metrics": [
|
116
|
-
<%- queue_names.each do |queue_name| -%>
|
117
|
-
[ "${self:custom.funktor.DashboardNamespace}", "processed", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
|
118
|
-
<%- end -%>
|
119
|
-
],
|
120
|
-
"view": "timeSeries",
|
121
|
-
"stacked": false,
|
122
|
-
"region": "us-east-1",
|
123
|
-
"title": "Processed Jobs By Queue",
|
124
|
-
"period": 60,
|
125
|
-
"stat": "Sum"
|
126
|
-
}
|
127
|
-
},
|
128
|
-
{ <% "p90 By Queue" %>
|
129
|
-
"height": 4,
|
130
|
-
"width": 12,
|
131
|
-
"y": <%= current_y %>,
|
132
|
-
"x": 12,
|
133
|
-
"type": "metric",
|
134
|
-
"properties": {
|
135
|
-
"metrics": [
|
136
|
-
<%- queue_names.each do |queue_name| -%>
|
137
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
|
138
|
-
<%- end -%>
|
139
|
-
],
|
140
|
-
"view": "timeSeries",
|
141
|
-
"stacked": false,
|
142
|
-
"region": "us-east-1",
|
143
|
-
"stat": "p90",
|
144
|
-
"period": 60,
|
145
|
-
"title": "p90 by Queue"
|
146
|
-
}
|
147
|
-
},
|
148
|
-
|
149
|
-
<% current_y += 3 %>
|
150
|
-
{ <% "Failed Jobs By Queue" %>
|
151
|
-
"height": 4,
|
152
|
-
"width": 12,
|
153
|
-
"y": <%= current_y %>,
|
154
|
-
"x": 0,
|
155
|
-
"type": "metric",
|
156
|
-
"properties": {
|
157
|
-
"metrics": [
|
158
|
-
<%- queue_names.each do |queue_name| -%>
|
159
|
-
[ "${self:custom.funktor.DashboardNamespace}", "failed", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
|
160
|
-
<%- end -%>
|
161
|
-
],
|
162
|
-
"view": "timeSeries",
|
163
|
-
"stacked": false,
|
164
|
-
"region": "us-east-1",
|
165
|
-
"title": "Failed Jobs By Queue",
|
166
|
-
"period": 60,
|
167
|
-
"stat": "Sum"
|
168
|
-
}
|
169
|
-
},
|
170
|
-
{ <% "p50 By Queue" %>
|
171
|
-
"height": 4,
|
172
|
-
"width": 12,
|
173
|
-
"y": <%= current_y %>,
|
174
|
-
"x": 12,
|
175
|
-
"type": "metric",
|
176
|
-
"properties": {
|
177
|
-
"metrics": [
|
178
|
-
<%- queue_names.each do |queue_name| -%>
|
179
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
|
180
|
-
<%- end -%>
|
181
|
-
],
|
182
|
-
"view": "timeSeries",
|
183
|
-
"stacked": false,
|
184
|
-
"region": "us-east-1",
|
185
|
-
"stat": "p50",
|
186
|
-
"period": 60,
|
187
|
-
"title": "p50 by Queue"
|
188
|
-
}
|
189
|
-
},
|
190
|
-
<% current_y += 3 %>
|
191
|
-
|
192
|
-
{ <% "Jobs/Minute Section" %>
|
24
|
+
{ <% "Primary Workers Overview" %>
|
193
25
|
"height": 1,
|
194
26
|
"width": 24,
|
195
27
|
"y": <%= current_y %>,
|
196
28
|
"x": 0,
|
197
29
|
"type": "text",
|
198
30
|
"properties": {
|
199
|
-
"markdown": "\n#
|
31
|
+
"markdown": "\n# Primary Workers Overview \n"
|
200
32
|
}
|
201
33
|
},
|
202
34
|
<% current_y += 1 %>
|
203
35
|
|
36
|
+
<%- prioritized_workers.each_with_index do |worker_name, index| -%>
|
37
|
+
<%- current_y += 9 if (index > 0 && (index % 6) == 0) %>
|
38
|
+
{ <% "Worker Overview" %>
|
39
|
+
"height": 9,
|
40
|
+
"width": 4,
|
41
|
+
"y": <%= current_y %>,
|
42
|
+
"x": <%= (index % 6) * 4 %>,
|
43
|
+
"type": "metric",
|
44
|
+
"properties": {
|
45
|
+
"metrics": [
|
46
|
+
[ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>", { "color": "#2ca02c" } ],
|
47
|
+
[ "${self:custom.funktor.DashboardNamespace}", "failed", "WorkerClassName", "<%= worker_name %>", { "color": "#d62728" } ],
|
48
|
+
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>", { "label": "p90", "color": "#ff7f0e", "stat": "p90" } ],
|
49
|
+
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>", { "label": "p60", "color": "#1f77b4", "stat": "p60" } ]
|
50
|
+
],
|
51
|
+
"view": "singleValue",
|
52
|
+
"region": "us-east-1",
|
53
|
+
"stat": "Sum",
|
54
|
+
"period": 60,
|
55
|
+
"sparkline": true,
|
56
|
+
"title": "<%= worker_name %>"
|
57
|
+
}
|
58
|
+
},
|
59
|
+
<%- end -%>
|
60
|
+
<%#- current_y += 9 if (prioritized_workers.count - 1) % 3 != 0 %>
|
61
|
+
<%- current_y += 9 %>
|
204
62
|
|
205
|
-
<%-
|
206
|
-
<%- current_y += 3 if (index > 0 && (index % 6) == 0) %>
|
207
|
-
{ <% "Processed Jobs By Worker" %>
|
208
|
-
"height": 3,
|
209
|
-
"width": 4,
|
210
|
-
"y": <%= current_y %>,
|
211
|
-
"x": <%= (index % 6) * 4 %>,
|
212
|
-
"type": "metric",
|
213
|
-
"properties": {
|
214
|
-
"metrics": [
|
215
|
-
[ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>" ]
|
216
|
-
],
|
217
|
-
"view": "timeSeries",
|
218
|
-
"stacked": false,
|
219
|
-
"region": "us-east-1",
|
220
|
-
"title": "<%= worker_name %> Jobs/Min",
|
221
|
-
"period": 60,
|
222
|
-
"stat": "Sum",
|
223
|
-
"legend": {
|
224
|
-
"position": "hidden"
|
225
|
-
}
|
226
|
-
}
|
227
|
-
},
|
228
|
-
<%- end -%>
|
229
|
-
<%- current_y += 3 if (primary_workers.count - 1) % 6 != 0 %>
|
230
|
-
|
231
|
-
|
232
|
-
{ <% "Failures/Minute Section" %>
|
233
|
-
"height": 1,
|
234
|
-
"width": 24,
|
235
|
-
"y": <%= current_y %>,
|
236
|
-
"x": 0,
|
237
|
-
"type": "text",
|
238
|
-
"properties": {
|
239
|
-
"markdown": "\n# Failures Per Minute By Worker\n"
|
240
|
-
}
|
241
|
-
},
|
242
|
-
<% current_y += 1 %>
|
243
|
-
|
244
|
-
|
245
|
-
<%- primary_workers.each_with_index do |worker_name, index| -%>
|
246
|
-
<%- current_y += 3 if (index > 0 && (index % 6) == 0) %>
|
247
|
-
{ <% "Failed Jobs By Worker" %>
|
248
|
-
"height": 3,
|
249
|
-
"width": 4,
|
250
|
-
"y": <%= current_y %>,
|
251
|
-
"x": <%= (index % 6) * 4 %>,
|
252
|
-
"type": "metric",
|
253
|
-
"properties": {
|
254
|
-
"metrics": [
|
255
|
-
[ "${self:custom.funktor.DashboardNamespace}", "failed", "WorkerClassName", "<%= worker_name %>", { "color": "#d62728" } ]
|
256
|
-
],
|
257
|
-
"view": "timeSeries",
|
258
|
-
"stacked": false,
|
259
|
-
"region": "us-east-1",
|
260
|
-
"title": "<%= worker_name %> Fails/Min",
|
261
|
-
"period": 60,
|
262
|
-
"stat": "Sum",
|
263
|
-
"legend": {
|
264
|
-
"position": "hidden"
|
265
|
-
}
|
266
|
-
}
|
267
|
-
},
|
268
|
-
<%- end -%>
|
269
|
-
<%- current_y += 3 if (primary_workers.count - 1) % 6 != 0 %>
|
270
|
-
|
271
|
-
|
272
|
-
{ <% "Duration Percentiles Section" %>
|
273
|
-
"height": 1,
|
274
|
-
"width": 24,
|
275
|
-
"y": <%= current_y %>,
|
276
|
-
"x": 0,
|
277
|
-
"type": "text",
|
278
|
-
"properties": {
|
279
|
-
"markdown": "\n# Duration Percentiles By Worker\n"
|
280
|
-
}
|
281
|
-
},
|
282
|
-
<% current_y += 1 %>
|
283
|
-
|
284
|
-
|
285
|
-
<%- primary_workers.each_with_index do |worker_name, index| -%>
|
286
|
-
<%- current_y += 4 if (index > 0 && (index % 6) == 0) %>
|
287
|
-
{ <% "Job Duration By Worker" %>
|
288
|
-
"height": 4,
|
289
|
-
"width": 4,
|
290
|
-
"y": <%= current_y %>,
|
291
|
-
"x": <%= (index % 6) * 4 %>,
|
292
|
-
"type": "metric",
|
293
|
-
"properties": {
|
294
|
-
"metrics": [
|
295
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>", { "label": "p90", "stat": "p90", "color": "#d62728" } ],
|
296
|
-
[ "...", { "label": "p80", "stat": "p80", "color": "#2ca02c" } ],
|
297
|
-
[ "...", { "label": "p70", "stat": "p70", "color": "#ff7f0e" } ],
|
298
|
-
[ "...", { "label": "p60", "color": "#1f77b4" } ]
|
299
|
-
],
|
300
|
-
"view": "timeSeries",
|
301
|
-
"stacked": false,
|
302
|
-
"region": "us-east-1",
|
303
|
-
"stat": "p60",
|
304
|
-
"period": 60,
|
305
|
-
"title": "<%= worker_name %> Duration Percentiles",
|
306
|
-
"legend": {
|
307
|
-
"position": "bottom"
|
308
|
-
}
|
309
|
-
}
|
310
|
-
},
|
311
|
-
<%- end -%>
|
312
|
-
<%- current_y += 3 if (primary_workers.count - 1) % 6 != 0 %>
|
313
|
-
|
314
|
-
|
315
|
-
<%- primary_workers.each do |worker_name| -%>
|
63
|
+
<%- prioritized_workers.each do |worker_name| -%>
|
316
64
|
{ <% "Worker" %>
|
317
65
|
"height": 1,
|
318
66
|
"width": 24,
|
@@ -585,98 +333,6 @@ Resources:
|
|
585
333
|
<% current_y += 6 %>
|
586
334
|
<%- end -%>
|
587
335
|
|
588
|
-
{ <% "Processed/Failed Jobs By Worker" %>
|
589
|
-
"height": 6,
|
590
|
-
"width": 12,
|
591
|
-
"y": <%= current_y %>,
|
592
|
-
"x": 0,
|
593
|
-
"type": "metric",
|
594
|
-
"properties": {
|
595
|
-
"metrics": [
|
596
|
-
<%- primary_workers.each do |worker_name| -%>
|
597
|
-
[ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>" ],
|
598
|
-
[ ".", "failed", ".", "." ]<%= worker_name == primary_workers.last ? "" : "," %>
|
599
|
-
<%- end -%>
|
600
|
-
],
|
601
|
-
"view": "timeSeries",
|
602
|
-
"stacked": false,
|
603
|
-
"region": "us-east-1",
|
604
|
-
"title": "Process/Failed Jobs By Worker",
|
605
|
-
"period": 60,
|
606
|
-
"stat": "Sum"
|
607
|
-
}
|
608
|
-
},
|
609
|
-
|
610
|
-
{ <% "Job Duration By Worker" %>
|
611
|
-
"height": 6,
|
612
|
-
"width": 12,
|
613
|
-
"y": <%= current_y %>,
|
614
|
-
"x": 12,
|
615
|
-
"type": "metric",
|
616
|
-
"properties": {
|
617
|
-
"metrics": [
|
618
|
-
<%- primary_workers.each do |worker_name| -%>
|
619
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>" ],
|
620
|
-
[ "...", { "stat": "p99" } ]<%= worker_name == primary_workers.last ? "" : "," %>
|
621
|
-
<%- end -%>
|
622
|
-
],
|
623
|
-
"view": "timeSeries",
|
624
|
-
"stacked": false,
|
625
|
-
"region": "us-east-1",
|
626
|
-
"stat": "Average",
|
627
|
-
"period": 60,
|
628
|
-
"title": "Job Duration by Worker"
|
629
|
-
}
|
630
|
-
},
|
631
|
-
|
632
|
-
|
633
|
-
<% current_y += 6 %>
|
634
|
-
|
635
|
-
{ <% "Job Duration By Queue" %>
|
636
|
-
"height": 6,
|
637
|
-
"width": 12,
|
638
|
-
"y": <%= current_y %>,
|
639
|
-
"x": 12,
|
640
|
-
"type": "metric",
|
641
|
-
"properties": {
|
642
|
-
"metrics": [
|
643
|
-
<%- queue_names.each do |queue_name| -%>
|
644
|
-
[ "${self:custom.funktor.DashboardNamespace}", "Duration", "Queue", "<%= queue_name.underscore %>" ],
|
645
|
-
[ "...", { "stat": "p99" } ]<%= queue_name == queue_names.last ? "" : "," %>
|
646
|
-
<%- end -%>
|
647
|
-
],
|
648
|
-
"view": "timeSeries",
|
649
|
-
"stacked": false,
|
650
|
-
"region": "us-east-1",
|
651
|
-
"stat": "Average",
|
652
|
-
"period": 60,
|
653
|
-
"title": "Job Duration by Queue"
|
654
|
-
}
|
655
|
-
},
|
656
|
-
{ <% "Processed/Failed Jobs By Queue" %>
|
657
|
-
"height": 6,
|
658
|
-
"width": 12,
|
659
|
-
"y": <%= current_y %>,
|
660
|
-
"x": 0,
|
661
|
-
"type": "metric",
|
662
|
-
"properties": {
|
663
|
-
"metrics": [
|
664
|
-
<%- queue_names.each do |queue_name| -%>
|
665
|
-
[ "${self:custom.funktor.DashboardNamespace}", "processed", "Queue", "<%= queue_name.underscore %>" ],
|
666
|
-
[ ".", "failed", ".", "." ]<%= queue_name == queue_names.last ? "" : "," %>
|
667
|
-
<%- end -%>
|
668
|
-
],
|
669
|
-
"view": "timeSeries",
|
670
|
-
"stacked": false,
|
671
|
-
"region": "us-east-1",
|
672
|
-
"title": "Process/Failed Jobs By Queue",
|
673
|
-
"period": 60,
|
674
|
-
"stat": "Sum"
|
675
|
-
}
|
676
|
-
},
|
677
|
-
|
678
|
-
|
679
|
-
<% current_y += 3 %>
|
680
336
|
{ <% "Funktor Behind the Scenes Banner" %>
|
681
337
|
"height": 3,
|
682
338
|
"width": 24,
|
data/lib/funktor/version.rb
CHANGED