blob: 035e538fd714180252888c97dd54b33948f4f469 [file] [log] [blame]
Matt Spinler10f3d932019-09-26 16:24:14 -05001{
2 "title": "PEL message registry schema",
3 "$id": "http://github.com/openbmc/phosphor-logging/extensions/openpower-pels/registry/schema/schema.json",
4 "description": "This schema describes JSON used for creating PELs from OpenBMC event logs.",
5 "type": "object",
6
7 "properties":
8 {
9 "PELs":
10 {
11 "title": "This is an array of entries that specify PEL fields for event logs",
12 "$ref": "#/definitions/pels"
13 }
14 },
15
16 "additionalProperties": false,
17 "minItems": 1,
18 "uniqueItems": true,
19
20 "definitions":
21 {
22 "pels":
23 {
24 "description": "Each entry in this array is for converting an event log to a PEL",
25 "type": "array",
26 "items":
27 {
28 "description": "The schema for a single event log registry entry",
29 "type": "object",
30 "properties":
31 {
32 "Name": {"$ref": "#/definitions/errorName" },
33
34 "SRC": {"$ref": "#/definitions/src" },
35
36 "Subsystem": {"$ref": "#/definitions/subsystem" },
37
38 "Severity": {"$ref": "#/definitions/severity" },
39
40 "MfgSeverity": {"$ref": "#/definitions/mfgSeverity" },
41
42 "EventScope": {"$ref": "#/definitions/eventScope" },
43
44 "EventType": {"$ref": "#/definitions/eventType" },
45
46 "ActionFlags": {"$ref": "#/definitions/actionFlags" },
47
48 "MfgActionFlags": {"$ref": "#/definitions/mfgActionFlags" },
49
50 "Documentation": {"$ref": "#/definitions/documentation" },
51
Matt Spinler9e819c72020-02-12 16:44:16 -060052 "ComponentID": {"$ref": "#/definitions/componentID" },
53
54 "CalloutsUsingAD": {"$ref": "#/definitions/calloutsUsingAD"},
55
56 "Callouts": {"$ref": "#/definitions/callouts"}
Matt Spinler10f3d932019-09-26 16:24:14 -050057 },
58
Matt Spinler3fb208e2019-10-30 15:50:37 -050059 "required": ["Name", "SRC", "Subsystem", "Documentation"],
Matt Spinler9e819c72020-02-12 16:44:16 -060060 "additionalProperties": false,
61
62 "not":
63 {
64 "required": ["CalloutsUsingAD", "Callouts"]
65 }
Matt Spinler10f3d932019-09-26 16:24:14 -050066 }
67 },
68
69 "errorName":
70 {
71 "description": "The 'Message' property of an OpenBMC event log",
72 "type": "string"
73 },
74
75 "componentID":
76 {
77 "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.",
78 "type": "string",
79 "pattern": "^0x[0-9a-fA-F]{2}00$"
80 },
81
82 "src":
83 {
84 "description": "Contains fields describing the primary SRC embedded in the PEL",
85 "type": "object",
86
87 "properties":
88 {
89 "Type": {"$ref": "#/definitions/srcType" },
90
91 "ReasonCode": {"$ref": "#/definitions/reasonCode" },
92
93 "SymptomIDFields": {"$ref": "#/definitions/symptomID" },
94
95 "Words6To9": {"$ref": "#/definitions/srcWords6To9" },
96
97 "PowerFault": {"$ref": "#/definitions/powerFault" }
98 },
99
100 "required": ["ReasonCode", "Words6To9"],
101 "additionalProperties": false
102 },
103
104 "documentation":
105 {
106 "description": "This contains event documentation that will be used by tools and parsers.",
107 "type": "object",
108
109 "properties":
110 {
111 "Message": {"$ref": "#/definitions/docMessage" },
112
113 "MessageArgSources": {"$ref": "#/definitions/docMessageArgSources" },
114
115 "Description": {"$ref": "#/definitions/docDescription" },
116
117 "Notes": {"$ref": "#/definitions/docNotes" }
118
119 },
120 "additionalProperties": false,
121 "required": ["Message", "Description"]
122 },
123
124 "srcType":
125 {
126 "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.",
127 "type": "string",
128 "enum": ["BD", "11"]
129 },
130
131 "docNotes":
132 {
133 "description": "Any notes/comments about the error. An array of strings for manual line wrapping. Optional.",
134 "type": "array",
135 "items":
136 {
137 "description": "Notes",
138 "type": "string"
139 }
140 },
141
142 "reasonCode":
143 {
144 "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.",
145 "type": "string",
146 "pattern": "^0x[0-9a-fA-F]{4}$",
147
148 "examples": [
149 "0x3355"
150 ]
151 },
152
153 "subsystem":
154 {
155 "description": "PEL subsystem enumeration. See the PEL spec for more detailed definitions.",
156 "type": "string",
157 "enum": ["processor", "processor_fru", "processor_chip",
158 "processor_unit", "processor_bus",
159
160 "memory", "memory_ctlr", "memory_bus", "memory_dimm",
161 "memory_fru", "external_cache",
162
163 "io", "io_hub", "io_bridge", "io_bus", "io_processor",
164 "io_hub_other", "phb",
165
166 "io_adapter", "io_adapter_comm", "io_device",
167 "io_device_dasd", "io_external_general",
168 "io_external_workstation", "io_storage_mezz",
169
170 "cec_hardware", "cec_sp_a", "cec_sp_b",
171 "cec_node_controller", "cec_vpd",
172 "cec_i2c", "cec_chip_iface", "cec_clocks", "cec_op_panel",
173 "cec_tod", "cec_storage_device", "cec_sp_hyp_iface",
174 "cec_service_network", "cec_sp_hostboot_iface",
175
176 "power", "power_supply", "power_control_hw", "power_fans",
177 "power_sequencer",
178
179 "others", "other_hmc", "other_test_tool", "other_media",
180 "other_multiple_subsystems", "other_na", "other_info_src",
181
182 "surv_hyp_lost_sp", "surv_sp_lost_hyp", "surv_sp_lost_hmc",
183 "surv_hmc_lost_lpar", "surv_hmc_lost_bpa",
184 "surv_hmc_lost_hmc",
185
186 "platform_firmware", "bmc_firmware", "hyp_firmware",
187 "partition_firmware", "slic_firmware", "spcn_firmware",
188 "bulk_power_firmware_side_a", "hmc_code_firmware",
189 "bulk_power_firmware_side_b", "virtual_sp", "hostboot",
190 "occ",
191
192 "software", "os_software", "xpf_software", "app_software",
193
194 "ext_env", "input_power_source", "ambient_temp",
195 "user_error", "corrosion"]
196 },
197
198 "severity":
199 {
200 "description": "PEL severity enumeration. Optional. If not provided, will use the event log severity. See the PEL spec for more detailed definitions.",
201 "type": "string",
202
203 "enum": ["non_error",
204
205 "recovered",
206
207 "predictive", "predictive_degraded_perf",
208 "predictive_reboot", "predictive_reboot_degraded",
209 "predictive_redundancy_loss",
210
211 "unrecoverable", "unrecoverable_degraded_perf",
212 "unrecoverable_redundancy_loss",
213 "unrecoverable_redundancy_loss_perf",
214 "unrecoverable_loss_of_function",
215
216 "critical", "critical_system_term",
217 "critical_imminent_failure",
218 "critical_partition_term",
219 "critical_partition_imminent_failure",
220
221 "diagnostic_error", "diagnostic_error_incorrect_results",
222
223 "symptom_recovered", "symptom_predictive",
224 "symptom_unrecoverable", "symptom_critical",
225 "symptom_diag_err"]
226 },
227
228 "mfgSeverity":
229 {
230 "description": "The PEL severity to use in manufacturing reporting mode",
231 "$ref": "#/definitions/severity"
232 },
233
234 "eventScope":
235 {
236 "description": "The event scope PEL field. Optional and defaults to entire_platform",
237 "type": "string",
238 "enum": ["entire_platform", "single_partition", "multiple_partitions",
Matt Spinlercc424542019-12-11 10:14:57 -0600239 "possibly_multiple_platforms"]
Matt Spinler10f3d932019-09-26 16:24:14 -0500240 },
241
242 "eventType":
243 {
244 "description": "The event type PEL field. Optional and defaults to na",
245 "type": "string",
246 "enum": ["na", "misc_information_only", "tracing_event",
247 "dump_notification"]
248 },
249
250 "powerFault":
251 {
252 "description": "The Power Fault SRC field (bit 6 in byte 1 of header). Optional and defaults to false",
253 "type": "boolean"
254 },
255
256 "actionFlags":
257 {
258 "description": "The action flags Private Header PEL field",
259 "type": "array",
260 "items":
261 {
262 "description": "List of action flags",
263 "type": "string",
264 "enum": ["service_action", "hidden", "report", "dont_report",
265 "call_home", "isolation_incomplete", "termination"]
266 }
267 },
268
269 "mfgActionFlags":
270 {
271 "description": "The PEL action flags to use in manufacturing reporting mode",
272 "$ref": "#/definitions/actionFlags"
273 },
274
275 "docDescription":
276 {
277 "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.",
278 "type": "string"
279 },
280
281 "docMessage":
282 {
283 "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.",
284 "type": "string",
285 "examples": [
286 {"Message": "The code update from level %1 to %2 failed" }
287 ]
288 },
289
290 "docMessageArgSources":
291 {
292 "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.",
293 "type": "array",
294 "items":
295 {
296 "type": "string",
297 "enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"]
298 },
299 "additionalItems": false
300 },
301
302 "symptomID":
303 {
304 "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).",
305 "type": "array",
306 "items":
307 {
308 "type": "string",
309 "enum": ["SRCWord3", "SRCWord4", "SRCWord5", "SRCWord6",
310 "SRCWord7", "SRCWord8", "SRCWord9"]
311 },
312 "minItems": 1,
313 "maxItems": 8,
314 "uniqueItems": true,
315
316 "examples": [
317 ["SRCWord3", "SRCWord6"]
318 ]
319 },
320
321 "srcWords6To9":
322 {
323 "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.",
324 "type": "object",
325 "patternProperties":
326 {
327 "^[6-9]$":
328 {
329 "type": "object",
330 "properties":
331 {
332 "Description":
333 {
334 "description": "What the value in the field represents.",
335 "type": "string"
336 },
337 "AdditionalDataPropSource":
338 {
339 "description": "Which AdditionalData property key to get the data from.",
340 "type": "string"
341 }
342 },
343
344 "additionalProperties": false
345 },
346
347 "examples":
348 {
349 "SRCWords6To9":
350 {
351 "6":
352 {
353 "Description": "Failing PSU number",
354 "AdditionalDataPropSource": "PSU_NUM"
355 }
356 }
357 }
358 },
359 "additionalProperties": false
Matt Spinler9e819c72020-02-12 16:44:16 -0600360 },
Matt Spinler10f3d932019-09-26 16:24:14 -0500361
Matt Spinler9e819c72020-02-12 16:44:16 -0600362 "adName":
363 {
364 "description": "The name of the AdditionalData entry to use to index into the callout tables.",
365 "type": "string"
366 },
367
368 "adValue":
369 {
370 "description": "The value for the AdditionalData entry specified by ADName that indexes into the callout tables.",
371 "type": "string"
372 },
373
374 "locationCode":
375 {
376 "description": "A location code - the segment after the 'UTMS-' prefix. (e.g. P1-C2)",
377 "type": "string"
378 },
379
380 "priority":
381 {
382 "description": "The callout priority. See the PEL spec for priority definitions.",
383 "type": "string",
384 "enum": ["high", "medium", "low", "medium_group_a",
385 "medium_group_b", "medium_group_c"]
386 },
387
388 "symbolicFRU":
389 {
390 "description": "The 7 character symbolic FRU callout name.",
391 "type": "string",
392 "pattern": "^[A-Z0-9]{7}$"
393 },
394
395 "procedure":
396 {
397 "description": "The 7 character procedure callout name.",
398 "type": "string",
399 "pattern": "^[A-Z0-9]{7}$"
400 },
401
402 "calloutType":
403 {
404 "description": "The failing component type from the FRU identity callout substructure. If not specified, the values hardware_fru, symbolic_fru, or maint_procedure will be used, depending on the callout type.",
405 "type": "string",
406 "enum": ["hardware_fru", "code_fru", "config_procedure",
407 "maint_procedure", "external_fru", "external_code_fru",
408 "tool_fru", "symbolic_fru", "symbolic_fru_trusted_loccode"]
409 },
410
411 "calloutList":
412 {
413 "description": "The list of FRU callouts to add to a PEL. If just LocCode is specified, it is a normal hardware FRU callout. Otherwise, Procedure or SymbolicFRU can be used to specify those types of callouts. With the latter 2 types, LocCode is optional. CalloutType is also optional, and is only needed if a value other than hardware_fru, maint_procedure, or symbolic_fru is desired.",
414 "type": "array",
415 "items":
416 {
417 "type": "object",
418 "properties":
419 {
420 "Priority": {"$ref": "#/definitions/priority" },
421 "LocCode": {"$ref": "#/definitions/locationCode" },
422 "SymbolicFRU": {"$ref": "#/definitions/symbolicFRU" },
423 "Procedure": {"$ref": "#/definitions/procedure" },
424 "CalloutType": {"$ref": "#/definitions/calloutType" }
425 },
426 "additionalProperties": false,
427 "required": ["Priority"],
428
429 "anyOf":
430 [
431 { "required": ["LocCode"] },
432 { "required": ["SymbolicFRU"] },
433 { "required": ["Procedure"] }
434 ],
435
436 "not":
437 {
438 "description": "A callout is not both a SymbolicFRU and a Procedure",
439 "required": ["SymbolicFRU", "Procedure"]
440 }
441 },
442 "minItems": 1,
443 "maxItems": 10,
444
445 "examples":
446 [
447 {
448 "Priority": "high",
449 "LocCode": "P1"
450 },
451 {
452 "Priority": "medium",
453 "LocCode": "P2",
454 "SymbolicFRU": "PROCFRU"
455 },
456 {
457 "Priority": "low",
458 "Procedure": "SVCDOCS"
459 }
460 ]
461 },
462
463 "system":
464 {
465 "description": "The system type string, as specified by entity manger. It is used to index into different sections of the JSON.",
466 "type": "string"
467 },
468
469 "callouts":
470 {
471 "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.",
472 "type": "array",
473 "items":
474 {
475 "type": "object",
476
477 "properties":
478 {
479 "System": {"$ref": "#/definitions/system" },
480 "CalloutList": {"$ref": "#/definitions/calloutList" }
481 },
482 "required": ["CalloutList"],
483 "additionalProperties": false
484 },
485 "minItems": 1,
486 "maxItems": 10,
487
488 "examples":
489 [
490 [
491 {
492 "System": "system1",
493 "CalloutList": [{"Priority": "high", "LocCode": "P1"}]
494 },
495 {
496 "CalloutList": [{"Priority": "high", "Procedure": "NEXTLVL"}]
497 }
498 ]
499 ]
500 },
501
502 "calloutsWithTheirADValues":
503 {
504 "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.",
505 "type": "array",
506
507 "items":
508 {
509 "type": "object",
510 "properties":
511 {
512 "ADValue": {"$ref": "#/definitions/adValue" },
513 "Callouts": {"$ref": "#/definitions/callouts" }
514 },
515 "additionalProperties": false,
516 "required": ["ADValue", "Callouts"]
517 },
518 "minItems": 1,
519 "maxItems": 10,
520
521 "examples":
522 [
523 [
524 {
525 "ADValue": "0",
526 "Callouts":
527 [
528 {
529 "CalloutList": [{"Priority": "high", "LocCode": "P1"}]
530 }
531 ]
532 },
533 {
534 "ADValue": "1",
535 "Callouts":
536 [
537 {
538 "CalloutList": [{"Priority": "high", "LocCode": "P2"}]
539 }
540 ]
541 }
542 ]
543 ]
544 },
545
546 "calloutsUsingAD":
547 {
548 "description": "This contains the callouts that can be specified based on a value in the AdditionalData property..",
549 "type": "object",
550
551 "properties":
552 {
553 "ADName": {"$ref": "#/definitions/adName" },
554 "CalloutsWithTheirADValues":
555 {"$ref": "#/definitions/calloutsWithTheirADValues" }
556 },
557 "additionalProperties": false,
558 "required": ["ADName", "CalloutsWithTheirADValues"],
559
560 "examples":
561 [
562 {
563 "ADName": "PROC_NUM",
564 "CalloutsWithTheirADValues":
565 [
566 {
567 "ADValue": "0",
568 "Callouts":
569 [
570 {
571 "CalloutList": [{"Priority": "high", "LocCode": "P1"}]
572 }
573 ]
574 },
575 {
576 "ADValue": "1",
577 "Callouts":
578 [
579 {
580 "CalloutList": [{"Priority": "high", "LocCode": "P2"}]
581 }
582 ]
583 }
584 ]
585 }
586 ]
587 }
Matt Spinler10f3d932019-09-26 16:24:14 -0500588 }
589}