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