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
use ;
// from assemblyline import odm
// from assemblyline.odm.messages import PerformanceTimer
// MSG_TYPES = {"IngestHeartbeat"}
// LOADER_CLASS = "assemblyline.odm.messages.ingest_heartbeat.IngestMessage"
// @odm.model(description="Queues")
// class Queues(odm.Model):
// critical = odm.Integer(description="Size of the critical priority queue")
// high = odm.Integer(description="Size of the high priority queue")
// ingest = odm.Integer(description="Size of the ingest queue")
// complete = odm.Integer(description="Size of the complete queue")
// low = odm.Integer(description="Size of the low priority queue")
// medium = odm.Integer(description="Size of the medium priority queue")
/// Metrics
// @odm.model(description="Processing")
// class Processing(odm.Model):
// inflight = odm.Integer(description="Number of inflight submissions")
// @odm.model(description="Chance of Processing")
// class ProcessingChance(odm.Model):
// critical = odm.Float(description="Chance of processing critical items")
// high = odm.Float(description="Chance of processing high items")
// low = odm.Float(description="Chance of processing low items")
// medium = odm.Float(description="Chance of processing medium items")
// @odm.model(description="Heartbeat Model")
// class Heartbeat(odm.Model):
// instances = odm.Integer(description="Number of ingest processes")
// metrics = odm.Compound(Metrics, description="Metrics")
// processing = odm.Compound(Processing, description="Inflight queue sizes")
// processing_chance = odm.Compound(ProcessingChance, description="Chance of processing items")
// queues = odm.Compound(Queues, description="Queue lengths block")
// @odm.model(description="Model of Ingester Heartbeat Message")
// class IngestMessage(odm.Model):
// msg = odm.Compound(Heartbeat, description="Heartbeat message")
// msg_loader = odm.Enum(values={LOADER_CLASS}, default=LOADER_CLASS, description="Loader class for message")
// msg_type = odm.Enum(values=MSG_TYPES, default="IngestHeartbeat", description="Type of message")
// sender = odm.Keyword(description="Sender of message")