summaryrefslogtreecommitdiff
path: root/meta-ampere
diff options
context:
space:
mode:
authorThang Q. Nguyen <thang@os.amperecomputing.com>2021-09-01 08:09:19 +0300
committerThang Q. Nguyen <thang@os.amperecomputing.com>2021-09-01 12:27:49 +0300
commitae6e8133a52f8b91d553f24fb32bb6fc4a21dd41 (patch)
tree2e8536d83031f89f1c5020b89510dfca37924bd6 /meta-ampere
parent92644b6d7f68fe9114690a09bedeca68fd6ce355 (diff)
downloadopenbmc-ae6e8133a52f8b91d553f24fb32bb6fc4a21dd41.tar.xz
meta-ampere: rsyslog: support IPMI SEL
Enable rsyslog to save IPMI SEL event into /var/log/ipmi_sel. Tested: 1. Log IPMI SEL event using xyz.openbmc_project.Logging.IPMI 2. Check /var/log/ipmi_sel for the new entry root@mtjade:~# cat /var/log/ipmi_sel 2021-09-01T09:23:49.022943+00:00 1,c0,3ACD000FEB00000000000000,,, Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Ic02a6166498251ed1e84a56e4847f465a069c872
Diffstat (limited to 'meta-ampere')
-rw-r--r--meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf28
1 files changed, 27 insertions, 1 deletions
diff --git a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf
index 656f1d3fb..121833f36 100644
--- a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf
+++ b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf
@@ -12,7 +12,26 @@
# journal workaround to avoid duplicate entries
module(load="imjournal" StateFile="/var/log/state"
RateLimit.Interval="60"
- RateLimit.Burst="2000")
+ RateLimit.Burst="4000")
+
+# Template for IPMI SEL messages
+# "<timestamp> <ID>,<Type>,<EventData>,[<Generator ID>,<Path>,<Direction>]"
+template(name="IPMISELTemplate" type="list") {
+ property(name="timereported" dateFormat="rfc3339")
+ constant(value=" ")
+ property(name="$!IPMI_SEL_RECORD_ID")
+ constant(value=",")
+ property(name="$!IPMI_SEL_RECORD_TYPE")
+ constant(value=",")
+ property(name="$!IPMI_SEL_DATA")
+ constant(value=",")
+ property(name="$!IPMI_SEL_GENERATOR_ID")
+ constant(value=",")
+ property(name="$!IPMI_SEL_SENSOR_PATH")
+ constant(value=",")
+ property(name="$!IPMI_SEL_EVENT_DIR")
+ constant(value="\n")
+}
# Template for Redfish messages
# "<timestamp> <MessageId>,<MessageArgs>"
@@ -37,6 +56,13 @@ template(name="CrashTemplate" type="list") {
}
+# If the journal entry has the IPMI SEL MESSAGE_ID, save as IPMI SEL
+# The MESSAGE_ID string is generated using journalctl and must match the
+# MESSAGE_ID used in IPMI to correctly find the SEL entries.
+if ($!MESSAGE_ID == "b370836ccf2f4850ac5bee185b77893a") then {
+ action(type="omfile" file="/var/log/ipmi_sel" template="IPMISELTemplate")
+}
+
# If the journal entry has a Redfish MessageId, save as a Redfish event
if ($!REDFISH_MESSAGE_ID != "") then {
action(type="omfile" file="/var/log/redfish" template="RedfishTemplate")