From 456380bb272d3a301c887eee513a3937cc1f48e1 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Tue, 22 Oct 2019 14:01:54 -0700 Subject: Update to internal 10-22-19 Signed-off-by: Jason M. Bills --- .../recipes-extended/rsyslog/rsyslog/rsyslog.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'meta-openbmc-mods/meta-common/recipes-extended') diff --git a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf index f00046b45..46a287eef 100644 --- a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf +++ b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf @@ -44,6 +44,18 @@ template(name="RedfishTemplate" type="list") { constant(value="\n") } +# Template for Application Crashes +# " ," +template(name="CrashTemplate" type="list") { + property(name="timereported" dateFormat="rfc3339") + constant(value=" ") + constant(value="OpenBMC.0.1.ServiceFailure") + constant(value=",") + property(name="$!UNIT") + constant(value="\n") +} + + # 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. @@ -56,6 +68,11 @@ if ($!REDFISH_MESSAGE_ID != "") then { action(type="omfile" file="/var/log/redfish" template="RedfishTemplate") } +# If the journal entry has a Exit Code, save as a Redfish event +if ($!EXIT_STATUS != "" and $!EXIT_STATUS != "0") then { + action(type="omfile" file="/var/log/redfish" template="CrashTemplate") +} + # # Include all config files in /etc/rsyslog.d/ # -- cgit v1.2.3