summaryrefslogtreecommitdiff
path: root/redfish-core/include/registries
AgeCommit message (Collapse)AuthorFilesLines
2020-08-03Add message registry entry for successful fw update stagingChalapathi Venkataramashetty1-1/+11
Add an event log in redfish when fw completed writing to staging area during firmware update. Tested: Update BMC firmware POST: https://<BMC_IP>/redfish/v1/UpdateService/ with <BMC_Update_Capsule> binary file After BMC reboots with successful update check for Event log in Redfish Command: GET: https://<BMC_IP>/redfish/v1/Systems/system/LogServices/ EventLog/Entries Response: { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/1595803968", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-07-26T22:52:48+00:00", "EntryType": "Event", "Id": "1595803968", "Message": "BMC firmware update to version 00.74 staged successfully.", "MessageArgs": [ "BMC", "00.74" ], "MessageId": "OpenBMC.0.1.FirmwareUpdateStaged", "Name": "System Event Log Entry", "Severity": "OK" }, Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> Change-Id: I62aad007c7fc8d311a351d1c5ec4e84d6b4a77ad
2020-07-30EventService: Add ResourceEvent registriesSunitha Harish1-0/+310
This commit adds new files for DMTF resource registry and corresponding json message definitions. Tested by: 1. GET https://${bmc}/redfish/v1/Registries 2. GET https://${bmc}/redfish/v1/Registries/ResourceEvent 3. GET https://${bmc}/redfish/v1/Registries/ResourceEvent/ResourceEvent 4. Redfish Validator passed ( giving out messages as == Severity: The given property is deprecated by revision: This property has been deprecated in favor of MessageSeverity, which ties the values to the enumerations defined for the Health property within Status.) Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: Iacbedaeca85c0dcfc955bcf9b10973c0d47c98e0
2020-07-13Move registries to v1_4_0.MessageRegistryGunnar Mills3-42/+515
This implements the MessageSeverity property which tools and users should use instead of the deprecated Severity property. Since the registries use common infrastructure, easiest if just bumped together and now allows grabbing the latest when implementing a new registry, e.g. ResourceEvent. Implement this new required property, MessageSeverity, in the openbmc registry. Follow Redfish registries in having both MessageSeverity and Severity. Modified parse_registries.py to look at latest Base and TaskEvent registries and ran parse_registries.py. Tested: Built and validator passes. See new registries: curl -k https://$bmc/redfish/v1/Registries/Base { "@odata.id": "/redfish/v1/Registries/Base", "@odata.type": "#MessageRegistryFile.v1_1_0.MessageRegistryFile", "Description": "DMTF Base Message Registry File Location", "Id": "Base", "Languages": [ "en" ], "Languages@odata.count": 1, "Location": [ { "Language": "en", "PublicationUri": "https://redfish.dmtf.org/registries/Base.1.8.1.json", "Uri": "/redfish/v1/Registries/Base/Base" } ], ... curl -k https://$bmc/redfish/v1/Registries/Base/Base { "@Redfish.Copyright": "Copyright 2014-2020 DMTF. All rights reserved.", "@odata.type": "#MessageRegistry.v1_4_0.MessageRegistry", "Description": "This registry defines the base messages for Redfish", "Id": "Base.1.8.1", "Language": "en", "Messages": { "AccessDenied": { "Description": "Indicates that while attempting to access, connect to or transfer to/from another resource, the service denied access.", "Message": "While attempting to establish a connection to %1, the service denied access.", "MessageSeverity": "Critical", "NumberOfArgs": 1, "ParamTypes": [ "string" ], "Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.", " ... Change-Id: I6495af0e02036ea527036d942d6b6b5f55178bb2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-06-29openbmc_message_registry: update failure reason in FirmwareUpdateFailedChalapathi Venkataramashetty1-3/+3
Update the failure reason in FirmwareUpdateFailed redfish message entry. Tested: 1. Update the corrupted image so that fw update fails. POST: https://<BMC_IP>/redfish/v1/UpdateService/ with <Corrupted_Update_Capsule> binary file Check event logs in redfish. Command: GET: https://<BMC_IP>/redfish/v1/Systems/system/LogServices/ EventLog/Entries Response: { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/1591111739", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-06-02T15:28:59+00:00", "EntryType": "Event", "Id": "1591111739", "Message": "BMC firmware update to version 00.59 started.", "MessageArgs": [ "BMC", "00.59", "" ], "MessageId": "OpenBMC.0.1.FirmwareUpdateStarted", "Name": "System Event Log Entry", "Severity": "OK" }, { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/1591111742", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-06-02T15:29:02+00:00", "EntryType": "Event", "Id": "1591111742", "Message": "BMC firmware update to version 00.59 failed: due to image verification error.", "MessageArgs": [ "BMC", "00.59", "due to image verification error" ], "MessageId": "OpenBMC.0.1.FirmwareUpdateFailed", "Name": "System Event Log Entry", "Severity": "Warning" }, Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> Change-Id: I79e9509f129a3b87fb21e961e7b7bd78809ca1e2
2020-06-27Update Service: Change error message based on error logsJames Feist1-1/+10
THis adds support for better error responses based on the logs generated by phosphor-software-manager. Tested: Got 400 error with different messages based on failure type { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid archive.", "MessageArgs": [ "/redfish/v1/UpdateService", "invalid archive" ], "MessageId": "OpenBMC.0.1.0.InvalidUpload", "Resolution": "None.", "Severity": "Warning" } ], "code": "OpenBMC.0.1.0.InvalidUpload", "message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid archive." } } { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid image format.", "MessageArgs": [ "/redfish/v1/UpdateService", "invalid image format" ], "MessageId": "OpenBMC.0.1.0.InvalidUpload", "Resolution": "None.", "Severity": "Warning" } ], "code": "OpenBMC.0.1.0.InvalidUpload", "message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid image format." } } { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_0_0.Message", "Message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources.", "MessageArgs": [ "/redfish/v1/UpdateService" ], "MessageId": "Base.1.4.0.ResourceExhaustion", "Resolution": "Ensure that the resources are available and resubmit the request.", "Severity": "Critical" } ], "code": "Base.1.4.0.ResourceExhaustion", "message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources." } } Change-Id: Ida9a23c10aedbf9a48c96f4050a04e06bddff284 Signed-off-by: James Feist <james.feist@linux.intel.com>
2020-06-22Dictionary translating ME Health to Redfish EventsAgnieszka Szlendak1-2/+330
This change follows commit intel-ipmi-oem/31645. Following code adds ME-specific event definitions to OpenBMC Message Registry. Testing: - injected all possible events with busctl call (faking ME) - tested on actual platform with manually triggered events by actual ME Signed-off-by: Agnieszka Szlendak <Agnieszka.Szlendak@intel.com> Change-Id: I36e26fc940d7fd279870504a19c3b37dd64d115e
2020-03-20Fix for message_registry entries count mismatchjayaprakash Mutyala1-1/+1
BMCWEB repo build is failing due to mismatch in number of message registry entries. So updated with correct message entry count. Tested: Redfish validator - passed Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: I69ad2850c862a1173987554da06163014a222b84
2020-03-19msg_registry: Add CPUMisMatch message entryjayaprakash Mutyala1-0/+10
Add "CPUMisMatch" message entry for CPU mismatch events Tested: 1. Redfish validator - passed for this new addition 2. Verified in Redfish, Memory message populated properly Redfish URI: GET: https://<BMC IP>/redfish/v1/Systems/system/LogServices/EventLog /Entries { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/1584354165", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-03-16T10:22:45+00:00", "EntryType": "Event", "Id": "1584354165", "Message": "CPU 1 Mismatch.", "MessageArgs": [ "1" ], "MessageId": "OpenBMC.0.1.CPUMisMatch", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/1584354165_1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-03-16T10:22:45+00:00", "EntryType": "Event", "Id": "1584354165_1", "Message": "CPU 2 Mismatch.", "MessageArgs": [ "2" ], "MessageId": "OpenBMC.0.1.CPUMisMatch", "Name": "System Event Log Entry", "Severity": "Critical" }, Signed-off-by: Snehalatha V <SnehalathaX.V@intel.com> Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: I6f5bbdab6bdce20e0d6401ec0b65567bdb8a48af
2020-03-19Add TaskEvent registryJames Feist2-1/+147
This updates the parse registries script and adds the task registry to be used by task service. This templates the original Base Registry so it can be reused for all registries. Tested: script works, validator passes Change-Id: Id1cf3a41fb76ccaadace114725480f410bfba3e8 Signed-off-by: James Feist <james.feist@linux.intel.com>
2020-03-18Log BIOS POST Codes Through RedfishZhikuiRen1-1/+10
Added PostCodes MessageID, PostCodesLogService, PostCodesClear, PostCodesEntry and PostCodesEntryCollection to redfish-core log_services. Design document located at openbmc/docs/designs/redfish-postcodes.md: Tested: Build with changes in phosphor-dbus-interfaces and phosphor-post-code-manager. PostCode Collection and entries passed RedfishServiceValidator test. Boot cycles are ordered so that B1 is for the most recent power on. Reviewed redfish log contents against design document that is mentioned above: bmc/redfish/v1/Systems/system/LogServices bmc/redfish/v1/Systems/system/LogServices/PostCodes bmc/redfish/v1/Systems/system/LogServices/PostCodes/Entries Send POST clear commands and verified PostCodes log is cleared and boot cycle count is reset to 1. Change-Id: I8de4d4749d1a17d590619d70670d279c01753b03 Signed-off-by: ZhikuiRen <zhikui.ren@intel.com>
2020-02-11Add message entry for BMC kernel panic eventYong Li1-1/+10
Log the BMC kernel panic event into redfish. Tested: Trigger a kernel panic by "echo c > /proc/sysrq-trigger", After BMC reboot, check the below message entry in redfish/v1/Systems/system/LogServices/EventLog/Entries: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/68627", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T19:03:47+00:00", "EntryType": "Event", "Id": "68627", "Message": "BMC rebooted due to kernel panic.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.BMCKernelPanic", "Name": "System Event Log Entry", "Severity": "OK" } Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: Ibc3075a48514b3288ba1a1b1fbe716f5e9deeb26
2020-01-23Correct Redfish message severity valuesJason M. Bills1-20/+20
Redfish specifies only "OK", "Warning", and "Critical" as valid values for message severity, but some messages have a severity of "Error". This changes the incorrect "Error" severity values to "Critical". Tested: Checked that all severity values are "OK", "Warning", or "Critical". Passed the Redfish service validator. Change-Id: If65665c76915e1730e6ae12c36003242aa9a85c6 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-01-17msg_registry: updated MemoryThermTrip msg entryjayaprakash Mutyala1-4/+5
Updated "MemoryThermTrip" message entry for CPU Memory Thermal Trip events. Tested: 1. Redfish validator - passed for this new addition 2. Verified in Redfish, MemoryThermTrip message populated properly Redfish URI: GET: https://<BMC IP>/redfish/v1/Systems/system/LogServices/EventLog /Entries { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/506", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:08:26+00:00", "EntryType": "Event", "Id": "506", "Message": "Memory ThermTrip asserted: CPU 1.", "MessageArgs": [ "CPU 1" ], "MessageId": "OpenBMC.0.1.MemoryThermTrip", "Name": "System Event Log Entry", "Severity": "Critical" } { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/506_2", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:08:26+00:00", "EntryType": "Event", "Id": "506_2", "Message": "Memory ThermTrip asserted: CPU 2.", "MessageArgs": [ "CPU 2" ], "MessageId": "OpenBMC.0.1.MemoryThermTrip", "Name": "System Event Log Entry", "Severity": "Critical" } Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Signed-off-by: Chalapathi <chalapathix.venkataramashetty@intel.com> Change-Id: I89271d28012c7f01a6cc37e1ef35c7e15f5e9965
2020-01-08bmcweb: Message entry for user security EventSuryakanth Sekar1-1/+80
Message entry for BMC should detect the following intrusion or non-allowed configuration and log the security event with description. 1. Password storing hash algo changes from SHA2-256 to MD5 in Linux pwd file 2. When any user other than root has its UID set to 0 in Linux pwd file 3. When any unsupported shells (not bash or sh) are present in Linux pwd file 4. When the root user is assigned a password in Linux password file Tested: 1. Ran Redfish validator - passed for this new addition. { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/75_1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:01:15+00:00", "EntryType": "Event", "Id": "75_1", "Message": "weak password computing hash algorithm is enabled = MD5 Hash algorithm .", "MessageArgs": [ "MD5 Hash algorithm" ], "MessageId": "OpenBMC.0.1.SecurityUserWeakHashAlgoEnabled", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/240", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:04:00+00:00", "EntryType": "Event", "Id": "240", "Message": "other than /bin/bash,/bin/sh, Unsupported shell is enabled", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SecurityUserUnsupportedShellEnabled", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/246", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:04:06+00:00", "EntryType": "Event", "Id": "246", "Message": "Unsupported shell is removed", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SecurityUserUnsupportedShellRemoved", "Name": "System Event Log Entry", "Severity": "OK" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/604", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:10:04+00:00", "EntryType": "Event", "Id": "604", "Message": "password computing hash algorithm is changed to sha256/sha512.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SecurityUserHashAlgoChanged", "Name": "System Event Log Entry", "Severity": "OK" } { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/75", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:01:15+00:00", "EntryType": "Event", "Id": "75", "Message": "root user is enabled.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SecurityUserRootEnabled", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1153", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:19:13+00:00", "EntryType": "Event", "Id": "1153", "Message": "uid Zero is assigned with non-root user", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SecurityUserNonRootUidZeroAssigned", "Name": "System Event Log Entry", "Severity": "Critical" } Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com> Change-Id: I8a3a10be2cc85614baa7b0d2f56b3376c3301e01
2019-12-20msg_registry:Added PowerSupplyConfigErrRecoveredjayaprakash Mutyala1-1/+12
Added PowerSupplyConfigurationErrorRecovered message entry in openbmc_message_registry as it is required when PSU deassert event occurred. This is continuation of below patch. https://gerrit.openbmc-project.xyz/#/c/openbmc/dbus-sensors/+/27701/ Tested: 1. Verified redfish validator passed 2. verified in Redfish, PowerSupplyConfigurationErrorRecovered message populated properly Get: https://<BMC IP>/redfish/v1/Systems/system/LogServices/ EventLog/Entries { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/42519", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T11:48:39+00:00", "EntryType": "Event", "Id": "42519", "Message": "Power supply PSU2 configuration error recovered.", "MessageArgs": [ "PSU2" ], "MessageId": "OpenBMC.0.1.PowerSupplyConfigurationErrorRecovered", "Name": "System Event Log Entry", "Severity": "OK" }, Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: Ifef9d323241f49124df7b85f85d42041e7ecdf83
2019-12-20Adjust the PSU related log levelYong Li1-4/+4
Based on the spec, these PSU related logs should be warning. Tested: With two PSUs, remove one AC cable, and then remove the PSU, Check the PSU related log in https://$BMCIP/redfish/v1/Systems/system/LogServices/EventLog/Entries Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: Iebce710d7d003731cbb956738d8be212bf04ad0b
2019-12-10bmcweb: Message entry for At-Scale Debug EventSuryakanth Sekar1-1/+85
Message entry for 1. At-Scale Debug session established and closed. 2. Whenever At-Scale Debug user is enabled or disabled 3. At-scalde Debug feature is enabled or disabled in platform 4. At-sclde Debug service is enabled or disabled Tested: 1. Ran Redfish validator - passed for this new addition. Log will be shown as below: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/254", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:04:14+00:00", "EntryType": "Event", "Id": "254", "Message": "At-Scale Debug Feature is enabled in hardware.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.AtScaleDebugFeatureEnabledAtHardware", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/254_1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:04:14+00:00", "EntryType": "Event", "Id": "254_1", "Message": "At-Scale Debug service is started.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.AtScaleDebugFeatureEnabled", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/30630_2", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T08:30:30+00:00", "EntryType": "Event", "Id": "30630_2", "Message": "At-scale-debug service is now connected 198.164.11.12", "MessageArgs": [ "198.164.11.12" ], "MessageId": "OpenBMC.0.1.AtScaleDebugConnected", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/30630_3", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T08:30:30+00:00", "EntryType": "Event", "Id": "30630_3", "Message": "At-scale-debug connection aborted/failed", "MessageArgs": [], "MessageId": "OpenBMC.0.1.AtScaleDebugConnectionFailed", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/30629_2", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T08:30:29+00:00", "EntryType": "Event", "Id": "30629_2", "Message": "At-scale-debug service is now disconnected", "MessageArgs": [], "MessageId": "OpenBMC.0.1.AtScaleDebugDisconnected", "Name": "System Event Log Entry", "Severity": "OK" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/262", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:04:22+00:00", "EntryType": "Event", "Id": "262", "Message": "At-Scale Debug special user is disabled", "MessageArgs": [], "MessageId": "OpenBMC.0.1.AtScaleDebugSpecialUserDisabled", "Name": "System Event Log Entry", "Severity": "OK" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/154", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:02:34+00:00", "EntryType": "Event", "Id": "154", "Message": "At-Scale Debug special user is enabled", "MessageArgs": [], "MessageId": "OpenBMC.0.1.AtScaleDebugSpecialUserEnabled", "Name": "System Event Log Entry", "Severity": "Critical" }, Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com> Change-Id: Id5369c36547c4a5d7ae6f1f1dbd4dae8317a26d7
2019-11-12Add constexpr to registriesEd Tanous2-2/+2
Because these structures are known at compile time, they can be constexpr with no ill effect. Tested: Code compiles, clang-tidy checks pass no functional change. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: James Feist <james.feist@linux.intel.com> Change-Id: Id78e3638b3dddd740f1a22e22d17fb0d6f8437d3
2019-11-08Register redfish logChen,Yugang1-1/+28
Need to Log security event for enabling uart-port-debug, P2A-bridge and BMC 2nd boot flash to redfish. tested: By settng the SCU registers for uart-port-debug disable bit, P2A-bridge enable bit and BMC 2nd boot flash enable bit, trigger security events, can see their redfish log. Change-Id: I75a7ed679c6b20d454a831e52d96dea30eea22bd Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
2019-11-06Add Drive Error Registry MessageJames Feist1-1/+11
This allows logging of drive errors. Tested: "DriveError": { "Description": "Indicates that a Drive Error occurred of the specified type or cause.", "Message": "Drive Error Occurred: %1.", "NumberOfArgs": 1, "ParamTypes": [ "string" ], "Resolution": "None.", "Severity": "Warning" } Change-Id: Ic97611e26710f57b09a7f89e0470f1277f710d5d Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-11-04Added registry entries for Platform firmware eventAppaRao Puli1-2/+133
Added message registry entries for logging platform firmware error, panic events and recovery events w.r.t specific components like BMC, BIOS, ME and CPLD ROT. These are useful for logging error/events, when the platform firmware components Like BMC, BIOS, ME and CPLD are compromised and automatic recovery actions are triggered. E.g: Can be used if BIOS/BMC or any platform firmware primary image boot failed, and secondary image is loaded. Tested: Using below URI and Method, verified the registry entries. URI: /redfish/v1/Registries/OpenBMC/OpenBMC METHOD: GET Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> Change-Id: Id797dafe6b88ac69ea0fde27ae45980610e29620
2019-10-30bmcweb: Message entry for system interface modesRichard Marian Thomaiyar1-1/+36
Message entry added for system interface mode (restriction mode), which is part of xyz/openbmc_project/Control/Security/RestrictionMode.interface.yaml. These message entries are used to indicate system interface restricted command excecution after BIOS POST. Tested: 1. Redfish validator - passed for this new addition 2. Log will be as below { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/184", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:03:04+00:00", "EntryType": "Event", "Id": "184", "Message": "The system interface is in the unprovisioned state.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SystemInterfaceUnprovisioned", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/198", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:03:18+00:00", "EntryType": "Event", "Id": "198", "Message": "The system interface is in the whitelist provisioned state.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SystemInterfaceWhitelistProvisioned", "Name": "System Event Log Entry", "Severity": "Warning" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/204", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:03:24+00:00", "EntryType": "Event", "Id": "204", "Message": "The system interface is in the disabled provisioned state.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SystemInterfaceDisabledProvisioned", "Name": "System Event Log Entry", "Severity": "OK" } Change-Id: I0e5496c50280f4614d08182b7b13136d254e1d40 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-10-29bmcweb: Message entry for Manufacturing modeRichard Marian Thomaiyar1-4/+14
Message entry added for manufacturing mode entry and exit, which is part of special mode property as defined in xyz/openbmc_project/Control/Security/SpecialMode.interface.yaml. These message entries are used to indicate whenever SpecialMode state of the BMC is updated from normal value and manufacturing mode and vice versa Tested: 1. Redfish validator - passed for this new addition 2. Log will be as below { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/317", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:05:17+00:00", "EntryType": "Event", "Id": "317", "Message": "Entered Manufacturing Mode.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.ManufacturingModeEntered", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/899", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:14:59+00:00", "EntryType": "Event", "Id": "899", "Message": "Exited Manufacturing Mode.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.ManufacturingModeExited", "Name": "System Event Log Entry", "Severity": "OK" } Change-Id: I182eeedb6860a3abcd4054caa431150ed073fbad Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-10-18Correct message entry orderQiang XU1-45/+43
All messages are ordered in alphabetical with MessageID. Correct message of physical security to right place. Tested: The LAN lost message is correct when unplug network cable of dedicate NIC Change-Id: If1e2c6aca45f393690de743acbe927957ecedee3 Signed-off-by: Qiang XU <qiang.xu@linux.intel.com>
2019-10-11Fix a bunch of warningsEd Tanous2-2150/+1923
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100 Seems like a good place to start, and would improve things a bit type-wise. This patchset attempts to correct all the issues in one shot. Tested: It builds. Will test various subsystems that have been touched Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
2019-09-24Add Power Unit Redundancy LogCheng C Yang1-0/+92
Add Power Unit Redundancy Redfish Log. Tested: Tested: When there are two PSU on the sytem, remove one AC cable on PSU. Then bellow Redfish log will be created. { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/ 1568504619_1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-09-14T23:43:39+00:00", "EntryType": "Event", "Id": "1568504619_1", "Message": "Power Unit Nonredundant but has sufficient resource.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.PowerUnitNonRedundantSufficient", "Name": "System Event Log Entry", "Severity": "Warning" }, Plug in the AC cable again, the Redfish log will show { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/ 1568504628", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-09-14T23:43:48+00:00", "EntryType": "Event", "Id": "1568504628", "Message": "Power Unit Redundancy regained.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.PowerUnitRedundancyRegained", "Name": "System Event Log Entry", "Severity": "OK" } Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com> Change-Id: I4f2d12e0dbc02f13062ea8e524b37248acf9c662
2019-09-24Add message entry for physical security eventQiang XU1-0/+47
Log the LAN link status and chassis intrusion status change. Tested: Unplug network cable of dedicate NIC Check the below log message in https://$bmcip/redfish/v1/Systems/system/LogServices/EventLog/Entries { "Message": "eth0(Dedicated Management NIC) LAN leash lost.", "MessageArgs": [ "eth0(Dedicated Management NIC)", ], "MessageId": "OpenBMC.0.1.LanLost", } Change-Id: I5c04f0314363de473ff92ff8bd3225c064aba547 Signed-off-by: Qiang XU <qiang.xu@linux.intel.com>
2019-09-18Add CPU and voltage regulator thermal messagesJason M. Bills1-0/+21
Tested: Used a heat gun to heat the CPU and voltage regulator and checked that the message is logged correctly. Change-Id: I4d73a9ad12691b364a33faf036a60f36bab0ac93 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-09-11Add PSU Deassert EventCheng C Yang1-10/+53
Add PSU Deassert Event for AC Lost, Predictive Failure, Failure, Fan Fault. Tested: Create a Fan Fault and then recover the Fan, check redfish log: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/ 1566427122_10", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-08-21T22:38:42+00:00", "EntryType": "Event", "Id": "1566427122_10", "Message": "Power supply PSU1 fan fan1 recovered.", "MessageArgs": [ "PSU1" ], "MessageId": "OpenBMC.0.1.PowerSupplyFanRecovered", "Name": "System Event Log Entry", "Severity": "OK" }, Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com> Change-Id: I224510c56ad87d1a2fc8e7ae5b3546fc34243d12
2019-08-28Add messages for power supply and system power good failuresJason M. Bills1-0/+24
Tested: Confirmed that the messages appear correctly in the registry under "/redfish/v1/Registries/OpenBMC/OpenBMC". Change-Id: Id730e6a1c14cbcbd74fc3310a1a41b557f93cb35 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-08-27Add Service Failure to registryJames Feist1-0/+10
Allow logging when a service exits. Tested: killed an application and saw: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1565496588", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-08-11T04:09:48+00:00", "EntryType": "Event", "Id": "1565496588", "Message": "Service xyz.openbmc_project.adcsensor.service has exited unsuccessfully.", "MessageArgs": [ "xyz.openbmc_project.adcsensor.service" ], "MessageId": "OpenBMC.0.1.ServiceFailure", "Name": "System Event Log Entry", "Severity": "Warning" }, Change-Id: I45c764986f0e99426ee9087245498d020c6508cb Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-08-17Fix an Intel copyright that was missed in CREd Tanous1-1/+1
There's lots of companies implementing OpenBMC, and we don't want the main MessageRegistry to be Copyright Intel, given its namespace and heritage. It looks like this snuck in when we moved it to the std::array based stuff. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I18c0705dc7fea8566bd2627f1d6a8fc0ec7ccd51
2019-08-15Register redfish logChen,Yugang1-0/+21
need to Log SSB Thermaltrip and NmiDiagInt(NMI Diagnostic Interrupt) to redfish. tested: Press NMI button, host shows NMI BSOD, and see BMC redfish's log. Trigger SSB Thermaltrip, can see its redfish log. Change-Id: I8f5b41dd6f381b3a70a45bbb851f2ba1657d2ec0 Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
2019-07-31Add power restore policy applied messageJason M. Bills1-0/+10
Tested: Checked '/redfish/v1/Registries/OpenBMC/OpenBMC' and confirmed that the message is listed. Change-Id: I2ecc00dca46f51cae73db71167cba04c9a7be746 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-07-25Add message entry for IPMI watchdog eventYong Li1-0/+15
Log the IPMI watchdog event into redfish. Tested: Set a hard reset watchdog: ipmitool raw 0x06 0x24 0x5 0x1 0x0 0x0 0x64 0x00 Start the timer: ipmitool mc watchdog reset Check the below log message in https://$bmcip/redfish/v1/Systems/system/LogServices/EventLog/Entries "Message": "Host Watchdog Event: Hard Reset – System reset due to Watchdog timeout", "MessageArgs": [ "Hard Reset – System reset due to Watchdog timeout" ], "MessageId": "OpenBMC.0.1.IPMIWatchdog", Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I652faf3b92489b2dd3216eb0cbaaf375e643c749
2019-07-18Change Name of PSU Event LogCheng C Yang1-7/+7
Originally PSU Event Log use PSU number as the parameter, change to PSU name as the parameter. Tested: Plug out AC cable on PSU2, we can see below in Redfish Log Entries. { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", data.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/#1562158096", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-07-03T12:48:16+00:00", "EntryType": "Event", "Id": "1562158096", "Message": "Power supply PSU2 AC power lost.", "MessageArgs": [ "PSU2" ], "MessageId": "OpenBMC.0.1.PowerSupplyACLost", "Name": "System Event Log Entry", "Severity": "Critical" }, Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com> Change-Id: I2fc32606bef334c9c5db8b8883ea14bb1e653579
2019-06-14Fix errors introduced in Message RegistriesEd Tanous1-1/+1
A recent commit introduced Service Validator regressions in the Registries that we use. This was largely because the commits were structured in a way that was hard to review. This commit Resolves that, and structures the data memebers in a more readable way. Tested: ran service validator, observed no failures on Registries. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I7e15899187e333f843e5571ac9908b22624c16e9
2019-06-05Add inventory added and removed to registryJames Feist1-0/+34
Add registry entries to aid parsing logs. Tested: Removed entity manager persistence file and got logs like the following: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/#1557855925", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-05-14T17:45:25+00:00", "EntryType": "Event", "Id": "1557855925", "Message": "F1UL16RISER1 Board with serial number BQWK63400247 was installed.", "MessageArgs": [ "F1UL16RISER1", "Board", "BQWK63400247" ], "MessageId": "OpenBMC.0.1.InventoryAdded", "Name": "System Event Log Entry", "Severity": "OK" } Change-Id: Id111872121b47395335d8c9e118dc6809a1b7574 Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-05-31Update fan added / removed to use stringJames Feist1-5/+5
Fan names aren't always fan %d, sometimes there are numbers too, or identifiers like CPU Fan 1. Change the argument to a string. Tested: Launched bmcweb and saw: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/#1556037042", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-04-23T16:30:42+00:00", "EntryType": "Event", "Id": "1556037042", "Message": "Fan 1 removed.", "MessageArgs": [ "Fan 1" ], "MessageId": "OpenBMC.0.1.FanRemoved", "Name": "System Event Log Entry", "Severity": "OK" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/#1556037055", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-04-23T16:30:55+00:00", "EntryType": "Event", "Id": "1556037055", "Message": "Fan 1 inserted.", "MessageArgs": [ "Fan 1" ], "MessageId": "OpenBMC.0.1.FanInserted", "Name": "System Event Log Entry", "Severity": "OK" }, Change-Id: Ic0d07ea1c96ee6a61caa912ecd091c2783f1d963 Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-05-08Remove the static OpenBMC Message Registry fileJason M. Bills1-0/+1213
This change removes the static OpenBMC Message Registry file and replaces it with a compile-time structure. Tested: Verified the OpenBMC Message registry is correctly returned from the existing endpoints without using the static files. Change-Id: I60ab3ce0d23c9ac7e91ebb85f445fb9ca731983d Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-05-08Parse Message Registry header info from the fileJason M. Bills1-1/+11
This extends the Message Registry parsing to include header details that are part of the redfish resource. Tested: Verified that the MessageRegistry info all returns correctly in the redfish response. Change-Id: I6179c07f4067cd4520fce3e774d18530fede0a95 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-05-08Remove the static Base Message Registry fileJason M. Bills1-0/+957
This change removes the static Base Message Registry file and replaces it with a compile-time structure. A script is used to pull the Base Message Registry file from the DMTF and parse it into the .hpp structure. Tested: Verified that after running the script, I can get the same Redfish data back from the existing endpoints without using the static files. Change-Id: Ide3c61ecff62801c06619d5c3edc2229c945d8e7 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>