diff options
Diffstat (limited to 'meta-ampere/meta-common/recipes-extended/rsyslog')
-rw-r--r-- | meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf | 28 | ||||
-rw-r--r-- | meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend | 10 |
2 files changed, 32 insertions, 6 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") diff --git a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend index f667fb649..034ae3cfa 100644 --- a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend +++ b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://rsyslog.conf \ file://rsyslog.logrotate \ @@ -7,11 +7,11 @@ SRC_URI += "file://rsyslog.conf \ file://rsyslog-override.conf \ " -FILES_${PN} += "${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf" +FILES:${PN} += "${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf" -PACKAGECONFIG_append = " imjournal" +PACKAGECONFIG:append = " imjournal" -do_install_append() { +do_install:append() { install -m 0644 ${WORKDIR}/rotate-event-logs.service ${D}${systemd_system_unitdir} install -d ${D}${systemd_system_unitdir}/rsyslog.service.d install -m 0644 ${WORKDIR}/rsyslog-override.conf \ @@ -21,4 +21,4 @@ do_install_append() { rm ${D}${sysconfdir}/rsyslog.d/imjournal.conf } -SYSTEMD_SERVICE_${PN} += " rotate-event-logs.service" +SYSTEMD_SERVICE:${PN} += " rotate-event-logs.service" |