-
Notifications
You must be signed in to change notification settings - Fork 79
/
schema.json
600 lines (595 loc) · 17.2 KB
/
schema.json
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
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"action": {
"title": "Agent action",
"description": "An Elastic Agent action",
"type": "object",
"properties": {
"_id": {
"description": "The unique identifier for action document",
"type": "string"
},
"_seq_no": {
"description": "The action sequence number",
"type": "integer"
},
"action_id": {
"description": "The unique identifier for the Elastic Agent action. There could be multiple documents with the same action_id if the action is split into two separate documents.",
"type": "string",
"format": "uuid"
},
"@timestamp": {
"description": "Date/time the action was created",
"type": "string",
"format": "date-time"
},
"expiration": {
"description": "The action expiration date/time",
"type": "string",
"format": "date-time"
},
"type": {
"description": "The action type. INPUT_ACTION is the value for the actions that suppose to be routed to the endpoints/beats.",
"type": "string"
},
"input_type": {
"description": "The input type the actions should be routed to.",
"type": "string"
},
"user_id": {
"description": "The ID of the user who created the action.",
"type": "string"
},
"agents": {
"description": "The Agent IDs the action is intended for. No support for json.RawMessage with the current generator. Could be useful to lazy parse the agent ids",
"type": "array",
"items": {
"type": "string"
}
},
"data": {
"description": "The opaque payload.",
"type": "object",
"format": "raw"
}
},
"required": [
"id"
]
},
"action-result": {
"title": "Agent action results",
"description": "An Elastic Agent action results",
"type": "object",
"properties": {
"@timestamp": {
"description": "Date/time the action was created",
"type": "string",
"format": "date-time"
},
"agent_id": {
"description": "The agent id.",
"type": "string"
},
"action_id": {
"description": "The action id.",
"type": "string"
},
"started_at": {
"description": "Date/time the action was started",
"type": "string",
"format": "date-time"
},
"completed_at": {
"description": "Date/time the action was completed",
"type": "string",
"format": "date-time"
},
"action_data": {
"description": "The opaque payload.",
"type": "object",
"format": "raw"
},
"error": {
"description": "The action error message.",
"type": "string"
},
"data": {
"description": "The opaque payload.",
"type": "object",
"format": "raw"
}
},
"required": [
"id",
"agent",
"action"
]
},
"agent-metadata": {
"title": "Agent Metadata",
"description": "An Elastic Agent metadata",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for the Elastic Agent",
"type": "string",
"format": "uuid"
},
"version": {
"description": "The version of the Elastic Agent",
"type": "string"
}
},
"required": [
"id",
"version"
]
},
"artifact": {
"title": "Artifact",
"description": "An artifact served by Fleet",
"type": "object",
"properties": {
"identifier": {
"description": "Human readable artifact identifier",
"type": "string"
},
"compression_algorithm": {
"description": "Name of compression algorithm applied to artifact",
"type": "string"
},
"encryption_algorithm": {
"description": "Name of encryption algorithm applied to artifact",
"type": "string"
},
"encoded_sha256": {
"description": "SHA256 of artifact after encoding has been applied",
"type": "string"
},
"encoded_size": {
"description": "Size of artifact after encoding has been applied",
"type": "integer"
},
"decoded_sha256": {
"description": "SHA256 of artifact before encoding has been applied",
"type": "string"
},
"decoded_size": {
"description": "Size of artifact before encoding has been applied",
"type": "integer"
},
"created": {
"description": "Timestamp artifact was created",
"type": "string",
"format": "date-time"
},
"body": {
"description": "Encoded artifact data",
"type": "object",
"format": "raw"
},
"package_name": {
"description": "Name of the package that owns this artifact",
"type": "string"
}
},
"required": [
"identifier",
"compressionAlgorithm",
"encodedSha256",
"encodedSize",
"decodedSha256",
"decodedSize",
"created",
"body"
]
},
"host-metadata": {
"title": "Host Metadata",
"description": "The host metadata for the Elastic Agent",
"type": "object",
"properties": {
"id": {
"description": "The ID of the host",
"type": "string"
},
"architecture": {
"description": "The architecture for the Elastic Agent",
"type": "string"
},
"name": {
"description": "The hostname of the Elastic Agent",
"type": "string"
},
"ip": {
"description": "The IP addresses of the Elastic Agent",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"architecture",
"name"
]
},
"server-metadata": {
"title": "Server Metadata",
"description": "A Fleet Server metadata",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for the Fleet Server",
"type": "string",
"format": "uuid"
},
"version": {
"description": "The version of the Fleet Server",
"type": "string"
}
},
"required": [
"id",
"version"
]
},
"server": {
"title": "Server",
"description": "A Fleet Server",
"type": "object",
"properties": {
"@timestamp": {
"description": "Date/time the server was updated",
"type": "string",
"format": "date-time"
},
"agent": { "$ref": "#/definitions/agent-metadata" },
"host": { "$ref": "#/definitions/host-metadata" },
"server": { "$ref": "#/definitions/server-metadata" }
},
"required": [
"agent",
"host",
"server"
]
},
"policy": {
"title": "Policy",
"description": "A policy that an Elastic Agent is attached to",
"type": "object",
"properties": {
"@timestamp": {
"description": "Date/time the policy revision was created",
"type": "string",
"format": "date-time"
},
"policy_id": {
"description": "The ID of the policy",
"type": "string",
"format": "uuid"
},
"revision_idx": {
"description": "The revision index of the policy",
"type": "integer"
},
"coordinator_idx": {
"description": "The coordinator index of the policy",
"type": "integer"
},
"data": {
"description": "The opaque payload.",
"type": "object",
"format": "raw"
},
"default_fleet_server": {
"description": "True when this policy is the default policy to start Fleet Server",
"type": "boolean"
},
"unenroll_timeout": {
"description": "Timeout (seconds) that an Elastic Agent should be un-enrolled.",
"type": "integer"
}
},
"required": [
"policy_id",
"revision_idx",
"coordinator_idx",
"data",
"default_fleet_server"
]
},
"policy-leader": {
"title": "Policy Leader",
"description": "The current leader Fleet Server for a policy",
"type": "object",
"properties": {
"@timestamp": {
"description": "Date/time the leader was taken or held",
"type": "string",
"format": "date-time"
},
"server": { "$ref": "#/definitions/server-metadata" }
},
"required": [
"server"
]
},
"agent": {
"title": "Agent",
"description": "An Elastic Agent that has enrolled into Fleet",
"type": "object",
"properties": {
"_id": {
"description": "The unique identifier for the Elastic Agent",
"type": "string",
"format": "uuid"
},
"_version": {
"description": "The version of the document in the index",
"type": "integer"
},
"shared_id": {
"description": "Shared ID",
"type": "string"
},
"type": {
"description": "Type",
"type": "string"
},
"active": {
"description": "Active flag",
"type": "boolean"
},
"enrolled_at": {
"description": "Date/time the Elastic Agent enrolled",
"type": "string",
"format": "date-time"
},
"unenrolled_at": {
"description": "Date/time the Elastic Agent unenrolled",
"type": "string",
"format": "date-time"
},
"unenrolled_reason": {
"description": "Reason the Elastic Agent was unenrolled",
"type": "string",
"enum": ["manual", "timeout"]
},
"unenrollment_started_at": {
"description": "Date/time the Elastic Agent unenrolled started",
"type": "string",
"format": "date-time"
},
"upgraded_at": {
"description": "Date/time the Elastic Agent was last upgraded",
"type": "string",
"format": "date-time"
},
"upgrade_started_at": {
"description": "Date/time the Elastic Agent started the current upgrade",
"type": "string",
"format": "date-time"
},
"access_api_key_id": {
"description": "ID of the API key the Elastic Agent must used to contact Fleet Server",
"type": "string"
},
"agent": { "$ref": "#/definitions/agent-metadata" },
"user_provided_metadata": {
"description": "User provided metadata information for the Elastic Agent",
"type": "object",
"format": "raw"
},
"local_metadata": {
"description": "Local metadata information for the Elastic Agent",
"type": "object",
"format": "raw"
},
"policy_id": {
"description": "The policy ID for the Elastic Agent",
"type": "string",
"format": "uuid"
},
"policy_revision_idx": {
"description": "The current policy revision_idx for the Elastic Agent",
"type": "integer"
},
"policy_coordinator_idx": {
"description": "The current policy coordinator for the Elastic Agent",
"type": "integer"
},
"policy_output_permissions_hash": {
"description": "The policy output permissions hash",
"type": "string"
},
"last_updated": {
"description": "Date/time the Elastic Agent was last updated",
"type": "string",
"format": "date-time"
},
"last_checkin": {
"description": "Date/time the Elastic Agent checked in last time",
"type": "string",
"format": "date-time"
},
"last_checkin_status": {
"description": "Lst checkin status",
"type": "string"
},
"default_api_key_id": {
"description": "ID of the API key the Elastic Agent uses to authenticate with elasticsearch",
"type": "string"
},
"default_api_key": {
"description": "API key the Elastic Agent uses to authenticate with elasticsearch",
"type": "string"
},
"updated_at": {
"description": "Date/time the Elastic Agent was last updated",
"type": "string",
"format": "date-time"
},
"packages": {
"description": "Packages array",
"type": "array",
"items": {
"type": "string"
}
},
"action_seq_no": {
"description": "The last acknowledged action sequence number for the Elastic Agent",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"_id",
"type",
"active",
"enrolled_at",
"status"
]
},
"enrollment_api_key": {
"title": "Enrollment API key",
"description": "An Elastic Agent enrollment API key",
"type": "object",
"properties": {
"active": {
"description": "True when the key is active",
"type": "boolean"
},
"api_key_id": {
"description": "The unique identifier for the enrollment key, currently xid",
"type": "string"
},
"api_key": {
"description": "Api key",
"type": "string"
},
"name": {
"description": "Enrollment key name",
"type": "string"
},
"policy_id": {
"type": "string"
},
"expire_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"api_key_id",
"api_key"
]
}
},
"checkin": {
"title": "Checkin",
"description": "An Elastic Agent checkin to Fleet",
"type": "object",
"properties": {
"_id": {
"description": "The unique identifier for the Elastic Agent checkin",
"type": "string",
"format": "uuid"
},
"@timestamp": {
"description": "Date/time the checkin was created",
"type": "string",
"format": "date-time"
},
"agent": { "$ref": "#/definitions/agent-metadata" },
"host": { "$ref": "#/definitions/host-metadata" },
"server": { "$ref": "#/definitions/server-metadata" },
"status": {
"description": "The current overall status of the Elastic Agent",
"type": "string",
"enum": ["enrolling", "healthy", "error", "degraded", "offline", "unenrolling", "upgrading"]
},
"message": {
"description": "The current overall status message of the Elastic Agent",
"type": "string"
},
"policy": {
"title": "Checkin Policy",
"description": "The current status of the applied policy",
"type": "object",
"properties": {
"id": {
"description": "The ID for the policy",
"type": "string",
"format": "uuid"
},
"revision": {
"description": "The revision of the policy",
"type": "integer"
},
"inputs": {
"title": "Checkin Policy Input",
"description": "The current input status per policy",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "The ID for the input",
"type": "string",
"format": "uuid"
},
"template_id": {
"description": "The template ID for the input",
"type": "string",
"format": "uuid"
},
"status": {
"description": "The current status of the input",
"type": "string",
"enum": ["healthy", "error", "degraded"]
},
"message": {
"description": "The current status message of the intput",
"type": "string"
}
},
"required": [
"id",
"template_id",
"status",
"message"
]
}
}
},
"required": [
"id",
"revision",
"inputs"
]
}
},
"required": [
"_id",
"agent",
"status",
"message",
"enrolled_at",
"updated_at"
]
}
}