-
Notifications
You must be signed in to change notification settings - Fork 0
/
trace
498 lines (428 loc) · 14 KB
/
trace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.FileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.FileAppender.
[INFO 14:57:43 RESTServer] Enactment Engine has started [http://0.0.0.0:9100/enactmentengine/]
[INFO 14:57:48 EEImpl] Choreography 1 created.
[INFO 14:57:48 ChoreographyEnacter] Starting enactment; chorId= 1
[INFO 14:57:48 NewDeploymentPreparing] Request to configure nodes; creating services; setting up Chef; for chor 1
[DEBUG 14:57:50 JCloudsCloudProvider] Creating node...
[DEBUG 14:57:52 JCloudsCloudProvider] Creating node...
[INFO 14:57:54 JCloudsCloudProvider] Creating Template with image ID: us-east-1/ami-3337675a; hardware ID: m1.small
[INFO 14:57:54 JCloudsCloudProvider] Creating Template with image ID: us-east-1/ami-3337675a; hardware ID: m1.small
[DEBUG 14:58:43 JCloudsCloudProvider$CreateNodeTask] Node [id=us-east-1/i-58645309, ip=54.82.13.79] created
[DEBUG 14:58:48 SshWaiter$SshWaiterCallable] Trying SSH into 54.82.13.79 again in 5 seconds
[DEBUG 14:58:55 SshWaiter$SshWaiterCallable] Trying SSH into 54.82.13.79 again in 5 seconds
[INFO 14:59:05 NodeBootstrapper] Bootstrapping 54.82.13.79
[DEBUG 14:59:35 JCloudsCloudProvider$CreateNodeTask] Node [id=us-east-1/i-9a6156cb, ip=54.82.246.46] created
[DEBUG 14:59:35 SshWaiter$SshWaiterCallable] Trying SSH into 54.82.246.46 again in 5 seconds
[INFO 14:59:42 NodeBootstrapper] Bootstrapping 54.82.246.46
[INFO 15:00:04 NodeBootstrapper] Bootstrap completed at Node [id=us-east-1/i-58645309, ip=54.82.13.79]
[INFO 15:00:04 ServiceDeploymentPreparer] Selected nodes to travelagency: [Node [id=us-east-1/i-58645309, ip=54.82.13.79]]
[INFO 15:00:33 NodeBootstrapper] Bootstrap completed at Node [id=us-east-1/i-9a6156cb, ip=54.82.246.46]
[INFO 15:00:33 ServiceDeploymentPreparer] Selected nodes to airline: [Node [id=us-east-1/i-9a6156cb, ip=54.82.246.46]]
[INFO 15:00:38 NewDeploymentPreparing] Nodes are configured to run chef-client on chor 1
[INFO 15:00:38 NodesUpdater] Going to update nodes of choreography 1
[DEBUG 15:00:38 NodeUpdater$ChefSoloTask] Updating node us-east-1/i-58645309
[DEBUG 15:00:38 NodeUpdater$ChefSoloTask] Updating node us-east-1/i-9a6156cb
[INFO 15:02:18 NodeUpdater$ChefSoloTask] Node Node [id=us-east-1/i-9a6156cb, ip=54.82.246.46] updated
[INFO 15:02:23 NodeUpdater$ChefSoloTask] Node Node [id=us-east-1/i-58645309, ip=54.82.13.79] updated
[INFO 15:02:23 ContextCaster] Passing context to deployed services on choreograghy 1
[DEBUG 15:02:24 GlimpseConsumer] <?xml version="1.0" encoding="UTF-8"?>
<ComplexEventRuleActionList xmlns="http://labse.isti.cnr.it/glimpse/xml/ComplexEventRule"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://labse.isti.cnr.it/glimpse/xml/ComplexEventRule ./ComplexEventRule.xsd">
<Insert RuleType="drools">
<RuleName>Choreography_1</RuleName>
<RuleBody>
import it.cnr.isti.labsedc.glimpse.event.GlimpseBaseEventChoreos;
import it.cnr.isti.labsedc.glimpse.manager.ResponseDispatcher;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
declare GlimpseBaseEventChoreos
@role( event )
@timestamp( timeStamp )
end
declare ResponseTimeEvent
@role(event)
@expires (2m)
value : float
ip : String
service: String
chor: String
end
declare CpuUserEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare LoadOneEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare FreeRamEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare BytesInEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare BytesOutEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare PktsInEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare PktsOutEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare DiskBytesWrittenEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare DiskBytesReadEvent
@role(event)
@expires (5m)
value : float
ip : String
end
declare AddReplica
@role(event)
@expires( 10m )
service : String
end
declare RemReplica
@role(event)
@expires ( 6m )
ip : String
end
rule "CpuUser"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "cpu_user"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new CpuUserEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "LoadOne"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "load_one"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new LoadOneEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "FreeRam"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "free_ram"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new FreeRamEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "BytesIn"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "bytes_in"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new BytesInEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "BytesOut"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "bytes_out"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new BytesOutEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "PktsIn"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "pkts_in"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new PktsInEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "PktsOut"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "pkts_out"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new PktsOutEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "DiskBytesWritten"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "disk_bytes_written"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new DiskBytesWrittenEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "DiskBytesRead"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.isException == false,
this.getEventName == "disk_bytes_read"
);
then
$aEvent.setConsumed(true);
update($aEvent);
Pattern p = Pattern.compile("Measured: ([0-9.]+)");
Matcher m1 = p.matcher((String) $aEvent.getEventData());
float f = -1;
if (m1.find())
f = Float.parseFloat(m1.group(0).split(": ")[1]);
insert (new DiskBytesReadEvent(f,$aEvent.getMachineIP()));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getMachineIP() + " " + f);
end
rule "LowCpuUser"
no-loop true
salience 20
dialect "mvel"
when
$ev : CpuUserEvent();
$rs : Number(50.0 > doubleValue) from accumulate(
CpuUserEvent($ev.ip == ip, $val : value),
average($val)
);
not RemReplica(ip == $ev.ip);
then
insert(new RemReplica($ev.ip));
ResponseDispatcher.LogViolation(drools.getRule().getName(),
"QoS Drools Rules",
"\nSLA QoS violation detected on: " + $ev.ip);
ResponseDispatcher.NotifyMeValue(drools.getRule().getName(),
"eeConsumer", (String) $ev.ip, "all");
end
rule "ResponseTime_Service_a5b6e7e3-f29f-457d-aa25-7c0ae90fc32a"
no-loop true
salience 20
dialect "mvel"
when
$aEvent : GlimpseBaseEventChoreos(
this.isConsumed == false,
this.getServiceSource == "a5b6e7e3-f29f-457d-aa25-7c0ae90fc32a",
this.isException == false,
this.getEventName == "response_time"
);
then
$aEvent.setConsumed(true);
update($aEvent);
float meas = Float.parseFloat((String) $aEvent.getEventData());
insert (new ResponseTimeEvent(meas,
(String) $aEvent.getMachineIP(),
(String) $aEvent.getServiceSource(),
(String) $aEvent.getChoreographySource())
);
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: Resource Metric Aggregator",
"\nSLA resource measurement: " + (String) $aEvent.getServiceSource() + " - " + (String) $aEvent.getEventData());
retract ($aEvent);
end
rule "HighResponseTime_Service_a5b6e7e3-f29f-457d-aa25-7c0ae90fc32a"
no-loop true
salience 30
dialect "mvel"
when
$ev : ResponseTimeEvent(service == "a5b6e7e3-f29f-457d-aa25-7c0ae90fc32a");
Number( $eventSum : doubleValue ) from accumulate(
$event : ResponseTimeEvent($ev.service == service, $ev.ip == ip),
count($event)
);
Number( intValue > $eventSum * 0.05 ) from accumulate(
$sEvent : ResponseTimeEvent(value > 900.0, $ev.service == service, $ev.ip == ip),
count($sEvent)
);
Number( doubleValue > 90.0 )
from accumulate( CpuUserEvent($ev.ip == ip, $val : value),
average($val)
);
not AddReplica(service == $ev.service);
then
insert(new AddReplica($ev.service));
ResponseDispatcher.LogViolation(
"\nRule name: " + drools.getRule().getName(),
"\nFrom: QoS Drools Rules",
"\nSLA QoS violation detected on: " + $ev.service);
ResponseDispatcher.NotifyMeValue(drools.getRule().getName(),
"eeConsumer", (String) $ev.ip, (String) $ev.service);
end
</RuleBody>
</Insert>
</ComplexEventRuleActionList>
[INFO 15:02:24 GlimpseConsumer] Starting running glimpse consumer for chor 1
ChorGlimpseConsumer: Creating InitialContext with settings [ OK ]
--------------------------------------------------------------------------------------
ChorGlimpseConsumer: Creating ConnectionFactory with settings [ OK ]
ChorGlimpseConsumer: Creating TopicConnection [ OK ]
--------------------------------------------------------------------------------------
ChorGlimpseConsumer: Creating Session [ OK ]
ChorGlimpseConsumer: Connecting to channel [ OK ]
ChorGlimpseConsumer: Create subscriber [ OK ]
ChorGlimpseConsumer: Starting connection [ OK ]
--------------------------------------------------------------------------------------
ChorGlimpseConsumer: Creating Session [ OK ]
ChorGlimpseConsumer: Looking up for channel [ OK ]
ChorGlimpseConsumer: Creating Publisher [ OK ]
ChorGlimpseConsumer: Creating Message [ OK ]
ChorGlimpseConsumer: Publishing message [ OK ]
--------------------------------------------------------------------------------------
[INFO 15:02:27 GlimpseConsumer] Glimpse consumer stated!
[INFO 15:02:27 ChoreographyEnacter] Enactment completed; chorId=1