Add message entry for BMC kernel panic event
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
diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp
index 848766e..588049a 100644
--- a/redfish-core/include/registries/openbmc_message_registry.hpp
+++ b/redfish-core/include/registries/openbmc_message_registry.hpp
@@ -29,7 +29,7 @@
"0.1.0",
"OpenBMC",
};
-constexpr std::array<MessageEntry, 152> registry = {
+constexpr std::array<MessageEntry, 153> registry = {
MessageEntry{
"ADDDCCorrectable",
{
@@ -199,6 +199,15 @@
{},
"None.",
}},
+ MessageEntry{"BMCKernelPanic",
+ {
+ "Indicates that BMC kernel panic occurred.",
+ "BMC rebooted due to kernel panic.",
+ "OK",
+ 0,
+ {},
+ "None.",
+ }},
MessageEntry{"BMCFirmwarePanicReason",
{
"Indicates the reason for last BMC firmware panic.",