blob: 3e94cd4e83fb0bc189936159f1cc7b44d0b9de8a [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
52 "ComponentID": {"$ref": "#/definitions/componentID" }
53 },
54
55 "required": ["Name", "SRC", "Subsystem", "Documentation",
56 "ActionFlags"],
57 "additionalProperties": false
58 }
59 },
60
61 "errorName":
62 {
63 "description": "The 'Message' property of an OpenBMC event log",
64 "type": "string"
65 },
66
67 "componentID":
68 {
69 "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.",
70 "type": "string",
71 "pattern": "^0x[0-9a-fA-F]{2}00$"
72 },
73
74 "src":
75 {
76 "description": "Contains fields describing the primary SRC embedded in the PEL",
77 "type": "object",
78
79 "properties":
80 {
81 "Type": {"$ref": "#/definitions/srcType" },
82
83 "ReasonCode": {"$ref": "#/definitions/reasonCode" },
84
85 "SymptomIDFields": {"$ref": "#/definitions/symptomID" },
86
87 "Words6To9": {"$ref": "#/definitions/srcWords6To9" },
88
89 "PowerFault": {"$ref": "#/definitions/powerFault" }
90 },
91
92 "required": ["ReasonCode", "Words6To9"],
93 "additionalProperties": false
94 },
95
96 "documentation":
97 {
98 "description": "This contains event documentation that will be used by tools and parsers.",
99 "type": "object",
100
101 "properties":
102 {
103 "Message": {"$ref": "#/definitions/docMessage" },
104
105 "MessageArgSources": {"$ref": "#/definitions/docMessageArgSources" },
106
107 "Description": {"$ref": "#/definitions/docDescription" },
108
109 "Notes": {"$ref": "#/definitions/docNotes" }
110
111 },
112 "additionalProperties": false,
113 "required": ["Message", "Description"]
114 },
115
116 "srcType":
117 {
118 "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.",
119 "type": "string",
120 "enum": ["BD", "11"]
121 },
122
123 "docNotes":
124 {
125 "description": "Any notes/comments about the error. An array of strings for manual line wrapping. Optional.",
126 "type": "array",
127 "items":
128 {
129 "description": "Notes",
130 "type": "string"
131 }
132 },
133
134 "reasonCode":
135 {
136 "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.",
137 "type": "string",
138 "pattern": "^0x[0-9a-fA-F]{4}$",
139
140 "examples": [
141 "0x3355"
142 ]
143 },
144
145 "subsystem":
146 {
147 "description": "PEL subsystem enumeration. See the PEL spec for more detailed definitions.",
148 "type": "string",
149 "enum": ["processor", "processor_fru", "processor_chip",
150 "processor_unit", "processor_bus",
151
152 "memory", "memory_ctlr", "memory_bus", "memory_dimm",
153 "memory_fru", "external_cache",
154
155 "io", "io_hub", "io_bridge", "io_bus", "io_processor",
156 "io_hub_other", "phb",
157
158 "io_adapter", "io_adapter_comm", "io_device",
159 "io_device_dasd", "io_external_general",
160 "io_external_workstation", "io_storage_mezz",
161
162 "cec_hardware", "cec_sp_a", "cec_sp_b",
163 "cec_node_controller", "cec_vpd",
164 "cec_i2c", "cec_chip_iface", "cec_clocks", "cec_op_panel",
165 "cec_tod", "cec_storage_device", "cec_sp_hyp_iface",
166 "cec_service_network", "cec_sp_hostboot_iface",
167
168 "power", "power_supply", "power_control_hw", "power_fans",
169 "power_sequencer",
170
171 "others", "other_hmc", "other_test_tool", "other_media",
172 "other_multiple_subsystems", "other_na", "other_info_src",
173
174 "surv_hyp_lost_sp", "surv_sp_lost_hyp", "surv_sp_lost_hmc",
175 "surv_hmc_lost_lpar", "surv_hmc_lost_bpa",
176 "surv_hmc_lost_hmc",
177
178 "platform_firmware", "bmc_firmware", "hyp_firmware",
179 "partition_firmware", "slic_firmware", "spcn_firmware",
180 "bulk_power_firmware_side_a", "hmc_code_firmware",
181 "bulk_power_firmware_side_b", "virtual_sp", "hostboot",
182 "occ",
183
184 "software", "os_software", "xpf_software", "app_software",
185
186 "ext_env", "input_power_source", "ambient_temp",
187 "user_error", "corrosion"]
188 },
189
190 "severity":
191 {
192 "description": "PEL severity enumeration. Optional. If not provided, will use the event log severity. See the PEL spec for more detailed definitions.",
193 "type": "string",
194
195 "enum": ["non_error",
196
197 "recovered",
198
199 "predictive", "predictive_degraded_perf",
200 "predictive_reboot", "predictive_reboot_degraded",
201 "predictive_redundancy_loss",
202
203 "unrecoverable", "unrecoverable_degraded_perf",
204 "unrecoverable_redundancy_loss",
205 "unrecoverable_redundancy_loss_perf",
206 "unrecoverable_loss_of_function",
207
208 "critical", "critical_system_term",
209 "critical_imminent_failure",
210 "critical_partition_term",
211 "critical_partition_imminent_failure",
212
213 "diagnostic_error", "diagnostic_error_incorrect_results",
214
215 "symptom_recovered", "symptom_predictive",
216 "symptom_unrecoverable", "symptom_critical",
217 "symptom_diag_err"]
218 },
219
220 "mfgSeverity":
221 {
222 "description": "The PEL severity to use in manufacturing reporting mode",
223 "$ref": "#/definitions/severity"
224 },
225
226 "eventScope":
227 {
228 "description": "The event scope PEL field. Optional and defaults to entire_platform",
229 "type": "string",
230 "enum": ["entire_platform", "single_partition", "multiple_partitions",
231 "possibly_multiple_partitions"]
232 },
233
234 "eventType":
235 {
236 "description": "The event type PEL field. Optional and defaults to na",
237 "type": "string",
238 "enum": ["na", "misc_information_only", "tracing_event",
239 "dump_notification"]
240 },
241
242 "powerFault":
243 {
244 "description": "The Power Fault SRC field (bit 6 in byte 1 of header). Optional and defaults to false",
245 "type": "boolean"
246 },
247
248 "actionFlags":
249 {
250 "description": "The action flags Private Header PEL field",
251 "type": "array",
252 "items":
253 {
254 "description": "List of action flags",
255 "type": "string",
256 "enum": ["service_action", "hidden", "report", "dont_report",
257 "call_home", "isolation_incomplete", "termination"]
258 }
259 },
260
261 "mfgActionFlags":
262 {
263 "description": "The PEL action flags to use in manufacturing reporting mode",
264 "$ref": "#/definitions/actionFlags"
265 },
266
267 "docDescription":
268 {
269 "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.",
270 "type": "string"
271 },
272
273 "docMessage":
274 {
275 "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.",
276 "type": "string",
277 "examples": [
278 {"Message": "The code update from level %1 to %2 failed" }
279 ]
280 },
281
282 "docMessageArgSources":
283 {
284 "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.",
285 "type": "array",
286 "items":
287 {
288 "type": "string",
289 "enum": ["SRCWord6", "SRCWord7", "SRCWord8", "SRCWord9"]
290 },
291 "additionalItems": false
292 },
293
294 "symptomID":
295 {
296 "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).",
297 "type": "array",
298 "items":
299 {
300 "type": "string",
301 "enum": ["SRCWord3", "SRCWord4", "SRCWord5", "SRCWord6",
302 "SRCWord7", "SRCWord8", "SRCWord9"]
303 },
304 "minItems": 1,
305 "maxItems": 8,
306 "uniqueItems": true,
307
308 "examples": [
309 ["SRCWord3", "SRCWord6"]
310 ]
311 },
312
313 "srcWords6To9":
314 {
315 "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.",
316 "type": "object",
317 "patternProperties":
318 {
319 "^[6-9]$":
320 {
321 "type": "object",
322 "properties":
323 {
324 "Description":
325 {
326 "description": "What the value in the field represents.",
327 "type": "string"
328 },
329 "AdditionalDataPropSource":
330 {
331 "description": "Which AdditionalData property key to get the data from.",
332 "type": "string"
333 }
334 },
335
336 "additionalProperties": false
337 },
338
339 "examples":
340 {
341 "SRCWords6To9":
342 {
343 "6":
344 {
345 "Description": "Failing PSU number",
346 "AdditionalDataPropSource": "PSU_NUM"
347 }
348 }
349 }
350 },
351 "additionalProperties": false
352 }
353
354 }
355}