forked from ibm-openbmc/phosphor-logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
852 lines (746 loc) · 29.7 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
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
{
"title": "PEL message registry schema",
"$id": "http://github.com/openbmc/phosphor-logging/extensions/openpower-pels/registry/schema/schema.json",
"description": "This schema describes JSON used for creating PELs from OpenBMC event logs.",
"type": "object",
"properties": {
"PELs": {
"title": "This is an array of entries that specify PEL fields for event logs",
"$ref": "#/definitions/pels"
}
},
"additionalProperties": false,
"minItems": 1,
"uniqueItems": true,
"definitions": {
"pels": {
"description": "Each entry in this array is for converting an event log to a PEL",
"type": "array",
"items": {
"description": "The schema for a single event log registry entry",
"type": "object",
"properties": {
"Name": { "$ref": "#/definitions/errorName" },
"SRC": { "$ref": "#/definitions/src" },
"Subsystem": { "$ref": "#/definitions/subsystem" },
"PossibleSubsystems": {
"$ref": "#/definitions/possibleSubsystems"
},
"Severity": { "$ref": "#/definitions/severity" },
"MfgSeverity": { "$ref": "#/definitions/mfgSeverity" },
"EventScope": { "$ref": "#/definitions/eventScope" },
"EventType": { "$ref": "#/definitions/eventType" },
"ActionFlags": { "$ref": "#/definitions/actionFlags" },
"MfgActionFlags": {
"$ref": "#/definitions/mfgActionFlags"
},
"Documentation": { "$ref": "#/definitions/documentation" },
"ComponentID": { "$ref": "#/definitions/componentID" },
"CalloutsUsingAD": {
"$ref": "#/definitions/calloutsUsingAD"
},
"Callouts": { "$ref": "#/definitions/callouts" },
"JournalCapture": { "$ref": "#/definitions/journalCapture" }
},
"required": ["Name", "SRC", "Documentation"],
"additionalProperties": false,
"not": {
"required": ["CalloutsUsingAD", "Callouts"]
},
"oneOf": [
{
"required": ["Subsystem"]
},
{
"required": ["PossibleSubsystems"]
}
]
}
},
"errorName": {
"description": "The 'Message' property of an OpenBMC event log",
"type": "string"
},
"componentID": {
"description": "The component ID of the PEL creator, in the form 0xYY00. For BD SRCs, this is optional and if not present the component ID will be taken from the upper byte of the reason code.",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{2}00$"
},
"src": {
"description": "Contains fields describing the primary SRC embedded in the PEL",
"type": "object",
"properties": {
"Type": { "$ref": "#/definitions/srcType" },
"ReasonCode": { "$ref": "#/definitions/reasonCode" },
"SymptomIDFields": { "$ref": "#/definitions/symptomID" },
"Words6To9": { "$ref": "#/definitions/srcWords6To9" },
"DeconfigFlag": { "$ref": "#/definitions/deconfigFlag" }
},
"required": ["ReasonCode", "Words6To9"],
"additionalProperties": false
},
"documentation": {
"description": "This contains event documentation that will be used by tools and parsers.",
"type": "object",
"properties": {
"Message": { "$ref": "#/definitions/docMessage" },
"MessageArgSources": {
"$ref": "#/definitions/docMessageArgSources"
},
"Description": { "$ref": "#/definitions/docDescription" },
"Notes": { "$ref": "#/definitions/docNotes" }
},
"additionalProperties": false,
"required": ["Message", "Description"]
},
"srcType": {
"description": "The first byte of the SRC ASCII string. Optional and defaults to BD. The '11' SRC is only to be used for events related to power.",
"type": "string",
"enum": ["BD", "11"]
},
"deconfigFlag": {
"description": "If true, will set bit 6 in hex data word 5, which means 'one or more resources are deconfigured'.",
"type": "boolean"
},
"docNotes": {
"description": "Any notes/comments about the error. An array of strings for manual line wrapping. Optional.",
"type": "array",
"items": {
"description": "Notes",
"type": "string"
}
},
"reasonCode": {
"description": "String representation of the 2 byte reason code, like 0xABCD. The reason code is the 2nd half of the 8 character SRC ASCII String field, such as B1FFABCD.",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{4}$",
"examples": ["0x3355"]
},
"subsystem": {
"description": "PEL subsystem enumeration. See the PEL spec for more detailed definitions.",
"type": "string",
"enum": [
"processor",
"processor_fru",
"processor_chip",
"processor_unit",
"processor_bus",
"memory",
"memory_ctlr",
"memory_bus",
"memory_dimm",
"memory_fru",
"external_cache",
"io",
"io_hub",
"io_bridge",
"io_bus",
"io_processor",
"io_hub_other",
"phb",
"io_adapter",
"io_adapter_comm",
"io_device",
"io_device_dasd",
"io_external_general",
"io_external_workstation",
"io_storage_mezz",
"cec_hardware",
"cec_sp_a",
"cec_sp_b",
"cec_node_controller",
"cec_vpd",
"cec_i2c",
"cec_chip_iface",
"cec_clocks",
"cec_op_panel",
"cec_tod",
"cec_storage_device",
"cec_sp_hyp_iface",
"cec_service_network",
"cec_sp_hostboot_iface",
"power",
"power_supply",
"power_control_hw",
"power_fans",
"power_sequencer",
"others",
"other_hmc",
"other_test_tool",
"other_media",
"other_multiple_subsystems",
"other_na",
"other_info_src",
"surv_hyp_lost_sp",
"surv_sp_lost_hyp",
"surv_sp_lost_hmc",
"surv_hmc_lost_lpar",
"surv_hmc_lost_bpa",
"surv_hmc_lost_hmc",
"platform_firmware",
"bmc_firmware",
"hyp_firmware",
"partition_firmware",
"slic_firmware",
"spcn_firmware",
"bulk_power_firmware_side_a",
"hmc_code_firmware",
"bulk_power_firmware_side_b",
"virtual_sp",
"hostboot",
"occ",
"software",
"os_software",
"xpf_software",
"app_software",
"ext_env",
"input_power_source",
"ambient_temp",
"user_error",
"corrosion"
]
},
"possibleSubsystems": {
"description": "Required when the PEL creator uses PEL_SUBSYSTEM in the AdditionalData property to pass in the subsystem. Used by scripts that generate documentation to build all possible SRC ASCII strings for this error.",
"type": "array",
"items": {
"$ref": "#/definitions/subsystem"
},
"minItems": 1,
"uniqueItems": true
},
"systemAndSeverity": {
"description": "A severity entry that has an optional system type qualifier. Used when the severity needs to be based on the system type.",
"type": "object",
"properties": {
"System": { "$ref": "#/definitions/system" },
"SevValue": { "$ref": "#/definitions/severityTypes" }
},
"additionalProperties": false,
"required": ["SevValue"]
},
"severity": {
"description": "PEL severity field. Optional. If not provided, it will use the event log severity. It can either be an enum of the severity value, or an array of them that is based on system type, where an entry without a system type acts as the catch all.",
"oneOf": [
{
"$ref": "#/definitions/severityTypes"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/systemAndSeverity"
},
"minItems": 1,
"uniqueItems": true
}
],
"examples": [
"unrecoverable",
[
{
"System": "systemA",
"SevValue": "predictive"
},
{
"SevValue": "unrecoverable"
}
]
]
},
"severityTypes": {
"description": "PEL severity enumeration. See the PEL spec for more detailed definitions.",
"type": "string",
"enum": [
"non_error",
"recovered",
"predictive",
"predictive_degraded_perf",
"predictive_reboot",
"predictive_reboot_degraded",
"predictive_redundancy_loss",
"unrecoverable",
"unrecoverable_degraded_perf",
"unrecoverable_redundancy_loss",
"unrecoverable_redundancy_loss_perf",
"unrecoverable_loss_of_function",
"critical",
"critical_system_term",
"critical_imminent_failure",
"critical_partition_term",
"critical_partition_imminent_failure",
"diagnostic_error",
"diagnostic_error_incorrect_results",
"symptom_recovered",
"symptom_predictive",
"symptom_unrecoverable",
"symptom_critical",
"symptom_diag_err"
]
},
"mfgSeverity": {
"description": "The PEL severity to use in manufacturing reporting mode",
"$ref": "#/definitions/severity"
},
"eventScope": {
"description": "The event scope PEL field. Optional and defaults to entire_platform",
"type": "string",
"enum": [
"entire_platform",
"single_partition",
"multiple_partitions",
"possibly_multiple_platforms"
]
},
"eventType": {
"description": "The event type PEL field. Optional and defaults to na",
"type": "string",
"enum": [
"na",
"misc_information_only",
"tracing_event",
"dump_notification",
"env_normal"
]
},
"actionFlags": {
"description": "The action flags Private Header PEL field",
"type": "array",
"items": {
"description": "List of action flags",
"type": "string",
"enum": [
"service_action",
"hidden",
"report",
"dont_report",
"call_home",
"isolation_incomplete",
"termination"
]
}
},
"mfgActionFlags": {
"description": "The PEL action flags to use in manufacturing reporting mode",
"$ref": "#/definitions/actionFlags"
},
"docDescription": {
"description": "This is a higher level description of the error. It is required by the Redfish schema to generate a Redfish message entry, but is not used in Redfish or PEL output.",
"type": "string",
"minLength": 8
},
"docMessage": {
"description": "The error message. This will show up in parsed PELs, and in the Redfish event logs. It can contain placeholders for numeric values using %1, %2, etc, that come from the SRC words 6-9 as defined by the MessageArgSources property.",
"type": "string",
"minLength": 8,
"examples": [
{ "Message": "The code update from level %1 to %2 failed" }
]
},
"docMessageArgSources": {
"description": "The SRC word 6-9 to use as the source of the numeric arguments that will be substituted into any placeholder in the Message field. Only required if there are arguments to substitute.",
"type": "array",
"items": {
"type": "string",
"enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"]
},
"additionalItems": false
},
"symptomID": {
"description": "Defines a custom Symptom ID, to be appended to the ASCII string word and separated by underscores. The maximum size of the Symptom ID field is 80 characters. The default is ASCIISTRING_SRCWord3 (e.g. B1103500_12345678).",
"type": "array",
"items": {
"type": "string",
"enum": [
"SRCWord3",
"SRCWord4",
"SRCWord5",
"SRCWord6",
"SRCWord7",
"SRCWord8",
"SRCWord9"
]
},
"minItems": 1,
"maxItems": 8,
"uniqueItems": true,
"examples": [["SRCWord3", "SRCWord6"]]
},
"srcWords6To9": {
"description": "This details what the user defined SRC hex words (6-9) mean, and which AdditionalData properties to get them from. These will be shown in the PEL parser output. Must be present, but can be empty.",
"type": "object",
"patternProperties": {
"^[6-9]$": {
"type": "object",
"properties": {
"Description": {
"description": "What the value in the field represents.",
"type": "string"
},
"AdditionalDataPropSource": {
"description": "Which AdditionalData property key to get the data from.",
"type": "string"
}
},
"additionalProperties": false
},
"examples": {
"SRCWords6To9": {
"6": {
"Description": "Failing PSU number",
"AdditionalDataPropSource": "PSU_NUM"
}
}
}
},
"additionalProperties": false
},
"adName": {
"description": "The name of the AdditionalData entry to use to index into the callout tables.",
"type": "string"
},
"adValue": {
"description": "The value for the AdditionalData entry specified by ADName that indexes into the callout tables.",
"type": "string"
},
"locationCode": {
"description": "A location code - the segment after the 'UTMS-' prefix. (e.g. P1-C2)",
"type": "string"
},
"priority": {
"description": "The callout priority. See the PEL spec for priority definitions.",
"type": "string",
"enum": [
"high",
"medium",
"low",
"medium_group_a",
"medium_group_b",
"medium_group_c"
]
},
"symbolicFRU": {
"description": "The symbolic FRU callout.",
"type": "string",
"enum": [
"service_docs",
"pwrsply",
"air_mover",
"pgood_part",
"usb_pgood",
"ambient_temp",
"ambient_temp_back",
"ambient_perf_loss",
"ac_module",
"fan_cable",
"cable_continued",
"altitude",
"pcie_hot_plug",
"overtemp",
"memory_dimm"
]
},
"symbolicFRUTrusted": {
"description": "The symbolic FRU callout with a trusted location code. (Can light LEDs).",
"ref": "#/definitions/symbolicFRU"
},
"procedure": {
"description": "The maintenance procedure callout.",
"type": "string",
"enum": [
"bmc_code",
"next_level_support",
"sbe_code",
"fsi_path",
"power_overcurrent",
"find_sue_root_cause",
"system_vpd_correction",
"detected_issue_need_service"
]
},
"useInventoryLocCode": {
"description": "Used along with SymbolicFRUTrusted to specify that the location code to use with the symbolic FRU is to be taken from the passed in CALLOUT_INVENTORY_PATH callout rather than being specified with LocCode.",
"type": "boolean"
},
"calloutList": {
"description": "The list of FRU callouts to add to a PEL. If just LocCode is specified, it is a normal hardware FRU callout. If Procedure is specified, it is a procedure callout. If SymbolicFRU or SymbolicFRUTrusted are specified, it is a Symbolic FRU callout. SymbolicFRUTrusted also requires LocCode.",
"type": "array",
"items": {
"type": "object",
"properties": {
"Priority": { "$ref": "#/definitions/priority" },
"LocCode": { "$ref": "#/definitions/locationCode" },
"SymbolicFRU": { "$ref": "#/definitions/symbolicFRU" },
"SymbolicFRUTrusted": {
"$ref": "#/definitions/symbolicFRUTrusted"
},
"Procedure": { "$ref": "#/definitions/procedure" },
"UseInventoryLocCode": {
"$ref": "#/definitions/useInventoryLocCode"
}
},
"additionalProperties": false,
"required": ["Priority"],
"oneOf": [
{
"allOf": [
{ "required": ["LocCode"] },
{ "not": { "required": ["SymbolicFRU"] } },
{ "not": { "required": ["SymbolicFRUTrusted"] } },
{ "not": { "required": ["Procedure"] } },
{ "not": { "required": ["UseInventoryLocCode"] } }
]
},
{
"allOf": [
{ "required": ["SymbolicFRU"] },
{ "not": { "required": ["SymbolicFRUTrusted"] } },
{ "not": { "required": ["Procedure"] } },
{ "not": { "required": ["UseInventoryLocCode"] } }
]
},
{
"allOf": [
{ "required": ["SymbolicFRUTrusted", "LocCode"] },
{ "not": { "required": ["SymbolicFRU"] } },
{ "not": { "required": ["Procedure"] } },
{ "not": { "required": ["UseInventoryLocCode"] } }
]
},
{
"allOf": [
{
"required": [
"SymbolicFRUTrusted",
"UseInventoryLocCode"
]
},
{ "not": { "required": ["SymbolicFRU"] } },
{ "not": { "required": ["Procedure"] } },
{ "not": { "required": ["LocCode"] } }
]
},
{
"allOf": [
{ "required": ["Procedure"] },
{ "not": { "required": ["SymbolicFRU"] } },
{ "not": { "required": ["SymbolicFRUTrusted"] } },
{ "not": { "required": ["LocCode"] } },
{ "not": { "required": ["UseInventoryLocCode"] } }
]
}
]
},
"minItems": 1,
"maxItems": 10,
"examples": [
{
"Priority": "high",
"LocCode": "P1"
},
{
"Priority": "medium",
"LocCode": "P2",
"SymbolicFRU": "PROCFRU"
},
{
"Priority": "low",
"Procedure": "SVCDOCS"
}
]
},
"system": {
"description": "The system type string, as specified by entity manger. It is used to index into different sections of the JSON.",
"type": "string",
"minLength": 1
},
"callouts": {
"description": "This contains callouts that can vary based on system type. Each entry contains an optional System property and a required CalloutList property. If the System property is left out it indicates that the CalloutList callouts are valid for every system type, unless there is another Callouts entry that has a matching System property, in which case that entry is valid.",
"type": "array",
"items": {
"type": "object",
"properties": {
"System": { "$ref": "#/definitions/system" },
"CalloutList": { "$ref": "#/definitions/calloutList" }
},
"required": ["CalloutList"],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 10,
"examples": [
[
{
"System": "system1",
"CalloutList": [{ "Priority": "high", "LocCode": "P1" }]
},
{
"CalloutList": [
{ "Priority": "high", "Procedure": "NEXTLVL" }
]
}
]
]
},
"calloutsWithTheirADValues": {
"description": "This contains callouts along with the AdditionalData value used to select an entry into the callout list. The AdditionalData entry was specified by ADName in the CalloutsUsingAD parent entry.",
"type": "array",
"items": {
"type": "object",
"properties": {
"ADValue": { "$ref": "#/definitions/adValue" },
"Callouts": { "$ref": "#/definitions/callouts" }
},
"additionalProperties": false,
"required": ["ADValue", "Callouts"]
},
"minItems": 1,
"examples": [
[
{
"ADValue": "0",
"Callouts": [
{
"CalloutList": [
{ "Priority": "high", "LocCode": "P1" }
]
}
]
},
{
"ADValue": "1",
"Callouts": [
{
"CalloutList": [
{ "Priority": "high", "LocCode": "P2" }
]
}
]
}
]
]
},
"calloutsUsingAD": {
"description": "This contains the callouts that can be specified based on a value in the AdditionalData property.",
"type": "object",
"properties": {
"ADName": { "$ref": "#/definitions/adName" },
"CalloutsWithTheirADValues": {
"$ref": "#/definitions/calloutsWithTheirADValues"
},
"CalloutsWhenNoADMatch": {
"$ref": "#/definitions/calloutsWhenNoADMatch"
}
},
"additionalProperties": false,
"required": ["ADName", "CalloutsWithTheirADValues"],
"examples": [
{
"ADName": "PROC_NUM",
"CalloutsWithTheirADValues": [
{
"ADValue": "0",
"Callouts": [
{
"CalloutList": [
{ "Priority": "high", "LocCode": "P1" }
]
}
]
},
{
"ADValue": "1",
"Callouts": [
{
"CalloutList": [
{ "Priority": "high", "LocCode": "P2" }
]
}
]
}
]
}
]
},
"calloutsWhenNoADMatch": {
"description": "This contains the callouts to use when a match in the 'CalloutsWithTheirADValues array isn't found.",
"$ref": "#/definitions/callouts"
},
"numLines": {
"description": "The number of lines of the journal to capture.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"syslogID": {
"description": "SYSLOG_IDENTIFIER value from the journal whose entries to capture.",
"type": "string",
"minLength": 1
},
"journalSection": {
"type": "object",
"properties": {
"SyslogID": { "$ref": "#/definitions/syslogID" },
"NumLines": { "$ref": "#/definitions/numLines" }
},
"additionalProperties": false,
"required": ["SyslogID", "NumLines"]
},
"journalSectionList": {
"description": "Describes which syslog IDs and how many journal lines to capture",
"type": "array",
"items": {
"$ref": "#/definitions/journalSection"
},
"minItems": 1,
"uniqueItems": true,
"examples": [
{
"Sections": [
{
"SyslogID": "phosphor-bmc-state-manager",
"NumLines": 20
}
]
}
]
},
"journalCapture": {
"description": "Allows a PEL to capture journal data in UserData sections.",
"type": "object",
"properties": {
"NumLines": { "$ref": "#/definitions/numLines" },
"Sections": { "$ref": "#/definitions/journalSectionList" }
},
"oneOf": [
{
"required": ["NumLines"]
},
{
"required": ["Sections"]
}
],
"additionalProperties": false,
"examples": [
{
"JournalCapture": {
"NumLines": 30
}
},
{
"JournalCapture": {
"Sections": [
{
"SyslogID": "phosphor-bmc-state-manager",
"NumLines": 20
},
{
"SyslogID": "phosphor-log-manager",
"NumLines": 15
}
]
}
}
]
}
}
}