1{ 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 "PELs": { 9 "title": "This is an array of entries that specify PEL fields for event logs", 10 "$ref": "#/definitions/pels" 11 } 12 }, 13 14 "additionalProperties": false, 15 "minItems": 1, 16 "uniqueItems": true, 17 18 "definitions": { 19 "pels": { 20 "description": "Each entry in this array is for converting an event log to a PEL", 21 "type": "array", 22 "items": { 23 "description": "The schema for a single event log registry entry", 24 "type": "object", 25 "properties": { 26 "Name": { "$ref": "#/definitions/errorName" }, 27 28 "SRC": { "$ref": "#/definitions/src" }, 29 30 "Subsystem": { "$ref": "#/definitions/subsystem" }, 31 32 "PossibleSubsystems": { 33 "$ref": "#/definitions/possibleSubsystems" 34 }, 35 36 "Severity": { "$ref": "#/definitions/severity" }, 37 38 "MfgSeverity": { "$ref": "#/definitions/mfgSeverity" }, 39 40 "EventScope": { "$ref": "#/definitions/eventScope" }, 41 42 "EventType": { "$ref": "#/definitions/eventType" }, 43 44 "ActionFlags": { "$ref": "#/definitions/actionFlags" }, 45 46 "MfgActionFlags": { 47 "$ref": "#/definitions/mfgActionFlags" 48 }, 49 50 "Documentation": { "$ref": "#/definitions/documentation" }, 51 52 "ComponentID": { "$ref": "#/definitions/componentID" }, 53 54 "CalloutsUsingAD": { 55 "$ref": "#/definitions/calloutsUsingAD" 56 }, 57 58 "Callouts": { "$ref": "#/definitions/callouts" }, 59 60 "JournalCapture": { "$ref": "#/definitions/journalCapture" } 61 }, 62 63 "required": ["Name", "SRC", "Documentation"], 64 "additionalProperties": false, 65 66 "not": { 67 "required": ["CalloutsUsingAD", "Callouts"] 68 }, 69 70 "oneOf": [ 71 { 72 "required": ["Subsystem"] 73 }, 74 { 75 "required": ["PossibleSubsystems"] 76 } 77 ] 78 } 79 }, 80 81 "errorName": { 82 "description": "The 'Message' property of an OpenBMC event log", 83 "type": "string" 84 }, 85 86 "componentID": { 87 "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.", 88 "type": "string", 89 "pattern": "^0x[0-9A-F]{2}00$" 90 }, 91 92 "src": { 93 "description": "Contains fields describing the primary SRC embedded in the PEL", 94 "type": "object", 95 96 "properties": { 97 "Type": { "$ref": "#/definitions/srcType" }, 98 99 "ReasonCode": { "$ref": "#/definitions/reasonCode" }, 100 101 "SymptomIDFields": { "$ref": "#/definitions/symptomID" }, 102 103 "Words6To9": { "$ref": "#/definitions/srcWords6To9" }, 104 105 "DeconfigFlag": { "$ref": "#/definitions/deconfigFlag" }, 106 107 "CheckstopFlag": { "$ref": "#/definitions/checkstopFlag" } 108 }, 109 110 "required": ["ReasonCode", "Words6To9"], 111 "additionalProperties": false 112 }, 113 114 "documentation": { 115 "description": "This contains event documentation that will be used by tools and parsers.", 116 "type": "object", 117 118 "properties": { 119 "Message": { "$ref": "#/definitions/docMessage" }, 120 121 "MessageArgSources": { 122 "$ref": "#/definitions/docMessageArgSources" 123 }, 124 125 "Description": { "$ref": "#/definitions/docDescription" }, 126 127 "Notes": { "$ref": "#/definitions/docNotes" } 128 }, 129 "additionalProperties": false, 130 "required": ["Message", "Description"] 131 }, 132 133 "srcType": { 134 "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.", 135 "type": "string", 136 "enum": ["BD", "11"] 137 }, 138 139 "deconfigFlag": { 140 "description": "If true, will set bit 6 in hex data word 5, which means 'one or more resources are deconfigured'.", 141 "type": "boolean" 142 }, 143 144 "checkstopFlag": { 145 "description": "Indicates the SRC is for a hardware checkstop.", 146 "type": "boolean" 147 }, 148 149 "docNotes": { 150 "description": "Any notes/comments about the error. An array of strings for manual line wrapping. Optional.", 151 "type": "array", 152 "items": { 153 "description": "Notes", 154 "type": "string" 155 } 156 }, 157 158 "reasonCode": { 159 "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.", 160 "type": "string", 161 "pattern": "^0x[0-9A-F]{4}$", 162 163 "examples": ["0x3355"] 164 }, 165 166 "subsystem": { 167 "description": "PEL subsystem enumeration. See the PEL spec for more detailed definitions.", 168 "type": "string", 169 "enum": [ 170 "processor", 171 "processor_fru", 172 "processor_chip", 173 "processor_unit", 174 "processor_bus", 175 176 "memory", 177 "memory_ctlr", 178 "memory_bus", 179 "memory_dimm", 180 "memory_fru", 181 "external_cache", 182 183 "io", 184 "io_hub", 185 "io_bridge", 186 "io_bus", 187 "io_processor", 188 "io_hub_other", 189 "phb", 190 191 "io_adapter", 192 "io_adapter_comm", 193 "io_device", 194 "io_device_dasd", 195 "io_external_general", 196 "io_external_workstation", 197 "io_storage_mezz", 198 199 "cec_hardware", 200 "cec_sp_a", 201 "cec_sp_b", 202 "cec_node_controller", 203 "cec_vpd", 204 "cec_i2c", 205 "cec_chip_iface", 206 "cec_clocks", 207 "cec_op_panel", 208 "cec_tod", 209 "cec_storage_device", 210 "cec_sp_hyp_iface", 211 "cec_service_network", 212 "cec_sp_hostboot_iface", 213 214 "power", 215 "power_supply", 216 "power_control_hw", 217 "power_fans", 218 "power_sequencer", 219 220 "others", 221 "other_hmc", 222 "other_test_tool", 223 "other_media", 224 "other_multiple_subsystems", 225 "other_na", 226 "other_info_src", 227 228 "surv_hyp_lost_sp", 229 "surv_sp_lost_hyp", 230 "surv_sp_lost_hmc", 231 "surv_hmc_lost_lpar", 232 "surv_hmc_lost_bpa", 233 "surv_hmc_lost_hmc", 234 235 "platform_firmware", 236 "bmc_firmware", 237 "hyp_firmware", 238 "partition_firmware", 239 "slic_firmware", 240 "spcn_firmware", 241 "bulk_power_firmware_side_a", 242 "hmc_code_firmware", 243 "bulk_power_firmware_side_b", 244 "virtual_sp", 245 "hostboot", 246 "occ", 247 248 "software", 249 "os_software", 250 "xpf_software", 251 "app_software", 252 253 "ext_env", 254 "input_power_source", 255 "ambient_temp", 256 "user_error", 257 "corrosion" 258 ] 259 }, 260 261 "possibleSubsystems": { 262 "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.", 263 "type": "array", 264 "items": { 265 "$ref": "#/definitions/subsystem" 266 }, 267 "minItems": 1, 268 "uniqueItems": true 269 }, 270 271 "systemAndSeverity": { 272 "description": "A severity entry that has an optional system type qualifier. Used when the severity needs to be based on the system type.", 273 "type": "object", 274 "properties": { 275 "System": { "$ref": "#/definitions/system" }, 276 "SevValue": { "$ref": "#/definitions/severityTypes" } 277 }, 278 "additionalProperties": false, 279 "required": ["SevValue"] 280 }, 281 282 "severity": { 283 "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.", 284 "oneOf": [ 285 { 286 "$ref": "#/definitions/severityTypes" 287 }, 288 { 289 "type": "array", 290 "items": { 291 "$ref": "#/definitions/systemAndSeverity" 292 }, 293 "minItems": 1, 294 "uniqueItems": true 295 } 296 ], 297 298 "examples": [ 299 "unrecoverable", 300 301 [ 302 { 303 "System": "systemA", 304 "SevValue": "predictive" 305 }, 306 { 307 "SevValue": "unrecoverable" 308 } 309 ] 310 ] 311 }, 312 313 "severityTypes": { 314 "description": "PEL severity enumeration. See the PEL spec for more detailed definitions.", 315 "type": "string", 316 317 "enum": [ 318 "non_error", 319 320 "recovered", 321 322 "predictive", 323 "predictive_degraded_perf", 324 "predictive_reboot", 325 "predictive_reboot_degraded", 326 "predictive_redundancy_loss", 327 328 "unrecoverable", 329 "unrecoverable_degraded_perf", 330 "unrecoverable_redundancy_loss", 331 "unrecoverable_redundancy_loss_perf", 332 "unrecoverable_loss_of_function", 333 334 "critical", 335 "critical_system_term", 336 "critical_imminent_failure", 337 "critical_partition_term", 338 "critical_partition_imminent_failure", 339 340 "diagnostic_error", 341 "diagnostic_error_incorrect_results", 342 343 "symptom_recovered", 344 "symptom_predictive", 345 "symptom_unrecoverable", 346 "symptom_critical", 347 "symptom_diag_err" 348 ] 349 }, 350 351 "mfgSeverity": { 352 "description": "The PEL severity to use in manufacturing reporting mode", 353 "$ref": "#/definitions/severity" 354 }, 355 356 "eventScope": { 357 "description": "The event scope PEL field. Optional and defaults to entire_platform", 358 "type": "string", 359 "enum": [ 360 "entire_platform", 361 "single_partition", 362 "multiple_partitions", 363 "possibly_multiple_platforms" 364 ] 365 }, 366 367 "eventType": { 368 "description": "The event type PEL field. Optional and defaults to na", 369 "type": "string", 370 "enum": [ 371 "na", 372 "misc_information_only", 373 "tracing_event", 374 "dump_notification", 375 "env_normal" 376 ] 377 }, 378 379 "actionFlags": { 380 "description": "The action flags Private Header PEL field", 381 "type": "array", 382 "items": { 383 "description": "List of action flags", 384 "type": "string", 385 "enum": [ 386 "service_action", 387 "hidden", 388 "report", 389 "dont_report", 390 "call_home", 391 "isolation_incomplete", 392 "termination" 393 ] 394 } 395 }, 396 397 "mfgActionFlags": { 398 "description": "The PEL action flags to use in manufacturing reporting mode", 399 "$ref": "#/definitions/actionFlags" 400 }, 401 402 "docDescription": { 403 "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.", 404 "type": "string", 405 "minLength": 8 406 }, 407 408 "docMessage": { 409 "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.", 410 "type": "string", 411 "minLength": 8, 412 "examples": [ 413 { "Message": "The code update from level %1 to %2 failed" } 414 ] 415 }, 416 417 "docMessageArgSources": { 418 "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.", 419 "type": "array", 420 "items": { 421 "type": "string", 422 "enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"] 423 }, 424 "additionalItems": false 425 }, 426 427 "symptomID": { 428 "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).", 429 "type": "array", 430 "items": { 431 "type": "string", 432 "enum": [ 433 "SRCWord3", 434 "SRCWord4", 435 "SRCWord5", 436 "SRCWord6", 437 "SRCWord7", 438 "SRCWord8", 439 "SRCWord9" 440 ] 441 }, 442 "minItems": 1, 443 "maxItems": 8, 444 "uniqueItems": true, 445 446 "examples": [["SRCWord3", "SRCWord6"]] 447 }, 448 449 "srcWords6To9": { 450 "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.", 451 "type": "object", 452 "patternProperties": { 453 "^[6-9]$": { 454 "type": "object", 455 "properties": { 456 "Description": { 457 "description": "What the value in the field represents.", 458 "type": "string" 459 }, 460 "AdditionalDataPropSource": { 461 "description": "Which AdditionalData property key to get the data from.", 462 "type": "string" 463 } 464 }, 465 466 "additionalProperties": false 467 }, 468 469 "examples": { 470 "SRCWords6To9": { 471 "6": { 472 "Description": "Failing PSU number", 473 "AdditionalDataPropSource": "PSU_NUM" 474 } 475 } 476 } 477 }, 478 "additionalProperties": false 479 }, 480 481 "adName": { 482 "description": "The name of the AdditionalData entry to use to index into the callout tables.", 483 "type": "string" 484 }, 485 486 "adValue": { 487 "description": "The value for the AdditionalData entry specified by ADName that indexes into the callout tables.", 488 "type": "string" 489 }, 490 491 "locationCode": { 492 "description": "A location code - the segment after the 'UTMS-' prefix. (e.g. P1-C2)", 493 "type": "string" 494 }, 495 496 "priority": { 497 "description": "The callout priority. See the PEL spec for priority definitions.", 498 "type": "string", 499 "enum": [ 500 "high", 501 "medium", 502 "low", 503 "medium_group_a", 504 "medium_group_b", 505 "medium_group_c" 506 ] 507 }, 508 509 "symbolicFRU": { 510 "description": "The symbolic FRU callout.", 511 "type": "string", 512 "enum": [ 513 "service_docs", 514 "pwrsply", 515 "air_mover", 516 "pgood_part", 517 "usb_pgood", 518 "ambient_temp", 519 "ambient_temp_back", 520 "ambient_perf_loss", 521 "ac_module", 522 "fan_cable", 523 "cable_continued", 524 "altitude", 525 "pcie_hot_plug", 526 "overtemp", 527 "memory_dimm" 528 ] 529 }, 530 531 "symbolicFRUTrusted": { 532 "description": "The symbolic FRU callout with a trusted location code. (Can light LEDs).", 533 "ref": "#/definitions/symbolicFRU" 534 }, 535 536 "procedure": { 537 "description": "The maintenance procedure callout.", 538 "type": "string", 539 "enum": [ 540 "bmc_code", 541 "next_level_support", 542 "sbe_code", 543 "fsi_path", 544 "power_overcurrent", 545 "find_sue_root_cause", 546 "system_vpd_correction", 547 "detected_issue_need_service" 548 ] 549 }, 550 551 "useInventoryLocCode": { 552 "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.", 553 "type": "boolean" 554 }, 555 556 "calloutList": { 557 "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.", 558 "type": "array", 559 "items": { 560 "type": "object", 561 "properties": { 562 "Priority": { "$ref": "#/definitions/priority" }, 563 "LocCode": { "$ref": "#/definitions/locationCode" }, 564 "SymbolicFRU": { "$ref": "#/definitions/symbolicFRU" }, 565 "SymbolicFRUTrusted": { 566 "$ref": "#/definitions/symbolicFRUTrusted" 567 }, 568 "Procedure": { "$ref": "#/definitions/procedure" }, 569 "UseInventoryLocCode": { 570 "$ref": "#/definitions/useInventoryLocCode" 571 } 572 }, 573 "additionalProperties": false, 574 "required": ["Priority"], 575 576 "oneOf": [ 577 { 578 "allOf": [ 579 { "required": ["LocCode"] }, 580 { "not": { "required": ["SymbolicFRU"] } }, 581 { "not": { "required": ["SymbolicFRUTrusted"] } }, 582 { "not": { "required": ["Procedure"] } }, 583 { "not": { "required": ["UseInventoryLocCode"] } } 584 ] 585 }, 586 { 587 "allOf": [ 588 { "required": ["SymbolicFRU"] }, 589 { "not": { "required": ["SymbolicFRUTrusted"] } }, 590 { "not": { "required": ["Procedure"] } }, 591 { "not": { "required": ["UseInventoryLocCode"] } } 592 ] 593 }, 594 595 { 596 "allOf": [ 597 { "required": ["SymbolicFRUTrusted", "LocCode"] }, 598 { "not": { "required": ["SymbolicFRU"] } }, 599 { "not": { "required": ["Procedure"] } }, 600 { "not": { "required": ["UseInventoryLocCode"] } } 601 ] 602 }, 603 604 { 605 "allOf": [ 606 { 607 "required": [ 608 "SymbolicFRUTrusted", 609 "UseInventoryLocCode" 610 ] 611 }, 612 { "not": { "required": ["SymbolicFRU"] } }, 613 { "not": { "required": ["Procedure"] } }, 614 { "not": { "required": ["LocCode"] } } 615 ] 616 }, 617 618 { 619 "allOf": [ 620 { "required": ["Procedure"] }, 621 { "not": { "required": ["SymbolicFRU"] } }, 622 { "not": { "required": ["SymbolicFRUTrusted"] } }, 623 { "not": { "required": ["LocCode"] } }, 624 { "not": { "required": ["UseInventoryLocCode"] } } 625 ] 626 } 627 ] 628 }, 629 "minItems": 1, 630 "maxItems": 10, 631 632 "examples": [ 633 { 634 "Priority": "high", 635 "LocCode": "P1" 636 }, 637 { 638 "Priority": "medium", 639 "LocCode": "P2", 640 "SymbolicFRU": "PROCFRU" 641 }, 642 { 643 "Priority": "low", 644 "Procedure": "SVCDOCS" 645 } 646 ] 647 }, 648 649 "system": { 650 "description": "The system type string, as specified by entity manger. It is used to index into different sections of the JSON.", 651 "type": "string", 652 "minLength": 1 653 }, 654 655 "callouts": { 656 "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.", 657 "type": "array", 658 "items": { 659 "type": "object", 660 661 "properties": { 662 "System": { "$ref": "#/definitions/system" }, 663 "CalloutList": { "$ref": "#/definitions/calloutList" } 664 }, 665 "required": ["CalloutList"], 666 "additionalProperties": false 667 }, 668 "minItems": 1, 669 "maxItems": 10, 670 671 "examples": [ 672 [ 673 { 674 "System": "system1", 675 "CalloutList": [{ "Priority": "high", "LocCode": "P1" }] 676 }, 677 { 678 "CalloutList": [ 679 { "Priority": "high", "Procedure": "NEXTLVL" } 680 ] 681 } 682 ] 683 ] 684 }, 685 686 "calloutsWithTheirADValues": { 687 "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.", 688 "type": "array", 689 690 "items": { 691 "type": "object", 692 "properties": { 693 "ADValue": { "$ref": "#/definitions/adValue" }, 694 "Callouts": { "$ref": "#/definitions/callouts" } 695 }, 696 "additionalProperties": false, 697 "required": ["ADValue", "Callouts"] 698 }, 699 "minItems": 1, 700 701 "examples": [ 702 [ 703 { 704 "ADValue": "0", 705 "Callouts": [ 706 { 707 "CalloutList": [ 708 { "Priority": "high", "LocCode": "P1" } 709 ] 710 } 711 ] 712 }, 713 { 714 "ADValue": "1", 715 "Callouts": [ 716 { 717 "CalloutList": [ 718 { "Priority": "high", "LocCode": "P2" } 719 ] 720 } 721 ] 722 } 723 ] 724 ] 725 }, 726 727 "calloutsUsingAD": { 728 "description": "This contains the callouts that can be specified based on a value in the AdditionalData property.", 729 "type": "object", 730 731 "properties": { 732 "ADName": { "$ref": "#/definitions/adName" }, 733 "CalloutsWithTheirADValues": { 734 "$ref": "#/definitions/calloutsWithTheirADValues" 735 }, 736 "CalloutsWhenNoADMatch": { 737 "$ref": "#/definitions/calloutsWhenNoADMatch" 738 } 739 }, 740 "additionalProperties": false, 741 "required": ["ADName", "CalloutsWithTheirADValues"], 742 743 "examples": [ 744 { 745 "ADName": "PROC_NUM", 746 "CalloutsWithTheirADValues": [ 747 { 748 "ADValue": "0", 749 "Callouts": [ 750 { 751 "CalloutList": [ 752 { "Priority": "high", "LocCode": "P1" } 753 ] 754 } 755 ] 756 }, 757 { 758 "ADValue": "1", 759 "Callouts": [ 760 { 761 "CalloutList": [ 762 { "Priority": "high", "LocCode": "P2" } 763 ] 764 } 765 ] 766 } 767 ] 768 } 769 ] 770 }, 771 772 "calloutsWhenNoADMatch": { 773 "description": "This contains the callouts to use when a match in the 'CalloutsWithTheirADValues array isn't found.", 774 "$ref": "#/definitions/callouts" 775 }, 776 777 "numLines": { 778 "description": "The number of lines of the journal to capture.", 779 "type": "integer", 780 "minimum": 1, 781 "maximum": 100 782 }, 783 784 "syslogID": { 785 "description": "SYSLOG_IDENTIFIER value from the journal whose entries to capture.", 786 "type": "string", 787 "minLength": 1 788 }, 789 790 "journalSection": { 791 "type": "object", 792 "properties": { 793 "SyslogID": { "$ref": "#/definitions/syslogID" }, 794 "NumLines": { "$ref": "#/definitions/numLines" } 795 }, 796 "additionalProperties": false, 797 "required": ["SyslogID", "NumLines"] 798 }, 799 800 "journalSectionList": { 801 "description": "Describes which syslog IDs and how many journal lines to capture", 802 "type": "array", 803 "items": { 804 "$ref": "#/definitions/journalSection" 805 }, 806 "minItems": 1, 807 "uniqueItems": true, 808 "examples": [ 809 { 810 "Sections": [ 811 { 812 "SyslogID": "phosphor-bmc-state-manager", 813 "NumLines": 20 814 } 815 ] 816 } 817 ] 818 }, 819 820 "journalCapture": { 821 "description": "Allows a PEL to capture journal data in UserData sections.", 822 "type": "object", 823 "properties": { 824 "NumLines": { "$ref": "#/definitions/numLines" }, 825 "Sections": { "$ref": "#/definitions/journalSectionList" } 826 }, 827 "oneOf": [ 828 { 829 "required": ["NumLines"] 830 }, 831 { 832 "required": ["Sections"] 833 } 834 ], 835 "additionalProperties": false, 836 "examples": [ 837 { 838 "JournalCapture": { 839 "NumLines": 30 840 } 841 }, 842 { 843 "JournalCapture": { 844 "Sections": [ 845 { 846 "SyslogID": "phosphor-bmc-state-manager", 847 "NumLines": 20 848 }, 849 { 850 "SyslogID": "phosphor-log-manager", 851 "NumLines": 15 852 } 853 ] 854 } 855 } 856 ] 857 } 858 } 859} 860