1# if you experience problems, check
2# http://www.rsyslog.com/troubleshoot for assistance
3
4# rsyslog v3: load input modules
5# If you do not load inputs, nothing happens!
6# You may need to set the module load path if modules are not found.
7#
8# Ported from debian's sysklogd.conf
9
10# Journal-style logging
11# Limit to no more than 2000 entries in one minute and enable the
12# journal workaround to avoid duplicate entries
13module(load="imjournal" StateFile="/var/log/state"
14                        RateLimit.Interval="60"
15                        RateLimit.Burst="2000")
16
17# Template for Redfish messages
18# "<timestamp> <MessageId>,<MessageArgs>"
19template(name="RedfishTemplate" type="list") {
20    property(name="timereported" dateFormat="rfc3339")
21    constant(value=" ")
22    property(name="$!REDFISH_MESSAGE_ID")
23    constant(value=",")
24    property(name="$!REDFISH_MESSAGE_ARGS")
25    constant(value="\n")
26}
27
28# Template for Application Crashes
29# "<timestamp> <MessageId>,<MessageArgs>"
30template(name="CrashTemplate" type="list") {
31    property(name="timereported" dateFormat="rfc3339")
32    constant(value=" ")
33    constant(value="OpenBMC.0.1.ServiceFailure")
34    constant(value=",")
35    property(name="$!UNIT")
36    constant(value="\n")
37}
38
39
40# If the journal entry has a Redfish MessageId, save as a Redfish event
41if ($!REDFISH_MESSAGE_ID != "") then {
42   action(type="omfile" file="/var/log/redfish" template="RedfishTemplate")
43}
44
45# If the journal entry has a Exit Code, save as a Redfish event
46if ($!EXIT_STATUS != "" and $!EXIT_STATUS != "0") then {
47   action(type="omfile" file="/var/log/redfish" template="CrashTemplate")
48}
49
50#
51# Include all config files in /etc/rsyslog.d/
52#
53$IncludeConfig /etc/rsyslog.d/*.conf
54