From 65d9cfae12a5b38300343df5a8bfade81ce68718 Mon Sep 17 00:00:00 2001 From: Jayashree Dhanapal Date: Tue, 15 Jun 2021 18:03:57 +0530 Subject: meta-facebook: Add rsyslog for Redfish. Added template for Redfish format in rsyslog conf file to save the journal entry as Redfish event. Tested : Verified journalctl log in tiogapass using Redfish. Signed-off-by: Jayashree Dhanapal Change-Id: Ic09530c824e65c5dd27fc4c6dac5a385370bdadc --- .../recipes-extended/rsyslog/rsyslog/rsyslog.conf | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'meta-facebook') diff --git a/meta-facebook/meta-tiogapass/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-facebook/meta-tiogapass/recipes-extended/rsyslog/rsyslog/rsyslog.conf index 3aae03f31..5a85aadb5 100644 --- a/meta-facebook/meta-tiogapass/recipes-extended/rsyslog/rsyslog/rsyslog.conf +++ b/meta-facebook/meta-tiogapass/recipes-extended/rsyslog/rsyslog/rsyslog.conf @@ -25,11 +25,26 @@ template(name="IPMISELTemplate" type="list") { constant(value="\n") } -# If the journal entry has a Redfish MessageId, save as a Redfish event +# Template for Redfish messages +# " ," +template(name="RedfishTemplate" type="list") { + property(name="timereported" dateFormat="rfc3339") + constant(value=" ") + property(name="$!REDFISH_MESSAGE_ID") + constant(value=",") + property(name="$!REDFISH_MESSAGE_ARGS") + constant(value="\n") +} + +# If the journal entry has a IPMI SEL MESSAGE_ID, save as IPMI SEL if ($!IPMISEL_MESSAGE_ID != "") 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") +} # # Include all config files in /etc/rsyslog.d/ # -- cgit v1.2.3