meta-facebook: enable event log on redfish
1. enable `send-to-logger` option in phosphor-sel-logger, handle logs by
Phosphor Log Manager.
2. enable `redfish-dbus-log` in bmcweb to add redfish support for
event logs.
Tested results:
- Redfish
$ curl -u root:0penBmc -k https://10.10.11.203/redfish/v1/Systems/system/LogServices/EventLog/Entries/15
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/15",
"@odata.type": "#LogEntry.v1_8_0.LogEntry",
"AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/EventLog/15/attachment",
"Created": "2022-05-04T06:17:21.948000+00:00",
"EntryType": "Event",
"Id": "15",
"Message": "xyz.openbmc_project.Logging.SEL.Error.Created",
"Modified": "2022-05-04T06:17:21.948000+00:00",
"Name": "System Event Log Entry",
"Resolved": false,
"Severity": "OK"
}
- CLI
root@bletchley:~# obmcutil listlogs
{
"type" : "as",
"data" : [
[
"/xyz/openbmc_project/logging/entry/15",
"/xyz/openbmc_project/logging/entry/16",
"/xyz/openbmc_project/logging/entry/17",
"/xyz/openbmc_project/logging/entry/18",
"/xyz/openbmc_project/logging/entry/19",
"/xyz/openbmc_project/logging/entry/20",
"/xyz/openbmc_project/logging/entry/21",
"/xyz/openbmc_project/logging/entry/22",
"/xyz/openbmc_project/logging/entry/23",
"/xyz/openbmc_project/logging/entry/24"
]
]
}
root@bletchley:~# obmcutil showlog /xyz/openbmc_project/logging/entry/15
{
"type" : "a{sv}",
"data" : [
{
"Id" : {
"type" : "u",
"data" : 15
},
"Timestamp" : {
"type" : "t",
"data" : 1651645041948
},
"Severity" : {
"type" : "s",
"data" : "xyz.openbmc_project.Logging.Entry.Level.Informational"
},
"Message" : {
"type" : "s",
"data" : "xyz.openbmc_project.Logging.SEL.Error.Created"
},
"EventId" : {
"type" : "s",
"data" : ""
},
"AdditionalData" : {
"type" : "as",
"data" : [
"EVENT_DIR=1",
"GENERATOR_ID=32",
"RECORD_TYPE=2",
"SENSOR_DATA=520007",
"SENSOR_PATH=/xyz/openbmc_project/sensors/fan_tach/FAN3_TACH_IL",
"_PID=327"
]
},
"Resolution" : {
"type" : "s",
"data" : ""
},
"Resolved" : {
"type" : "b",
"data" : false
},
"ServiceProviderNotify" : {
"type" : "b",
"data" : false
},
"UpdateTimestamp" : {
"type" : "t",
"data" : 1651645041948
}
}
]
}
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ie4094c8e20224506474b75ae18ede97adfdd5bb7
diff --git a/meta-facebook/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-facebook/recipes-phosphor/interfaces/bmcweb_%.bbappend
new file mode 100644
index 0000000..699ad7f
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -0,0 +1,3 @@
+EXTRA_OEMESON:append = "\
+ -Dredfish-dbus-log=enabled \
+"
diff --git a/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
index ca35bcb..35e7f3a 100644
--- a/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
+++ b/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -1 +1 @@
-PACKAGECONFIG:append = " log-threshold log-pulse"
+PACKAGECONFIG:append = " log-threshold log-pulse send-to-logger"