mirror of
https://github.com/Febbweiss/docker-log-centralizer.git
synced 2026-03-04 22:35:36 +00:00
Feature: add rsyslog multiline logs
This commit is contained in:
11
rsyslog/conf.d/rsyslog-json.conf
Normal file
11
rsyslog/conf.d/rsyslog-json.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
template(name="ls_json"
|
||||
type="list"
|
||||
option.json="on") {
|
||||
constant(value="{")
|
||||
constant(value="\"@timestamp\":\"") property(name="timereported" dateFormat="rfc3339")
|
||||
constant(value="\",\"message\":\"") property(name="msg")
|
||||
constant(value="\",\"host\":\"") property(name="hostname")
|
||||
constant(value="\",\"programname\":\"") property(name="programname")
|
||||
constant(value="\",\"procid\":\"") property(name="procid")
|
||||
constant(value="\"}")
|
||||
}
|
||||
9
rsyslog/conf.d/rsyslog.conf
Normal file
9
rsyslog/conf.d/rsyslog.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
module(load="imfile" PollingInterval="10" mode="inotify") #needs to be done just once
|
||||
|
||||
input(type="imfile"
|
||||
File="/var/log/java/*.log"
|
||||
Tag="javalog"
|
||||
PersistStateInterval="100"
|
||||
Severity="info"
|
||||
startmsg.regex="^[[:digit:]]{1,2}-[[:digit:]]{1,2}-[[:digit:]]{1,4} [[:digit:]]{1,2}:[[:digit:]]{1,2}:[[:digit:]]{1,2}"
|
||||
)
|
||||
3
rsyslog/rsyslog.conf
Normal file
3
rsyslog/rsyslog.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
$IncludeConfig /etc/rsyslog-confd/*.conf
|
||||
|
||||
*.* @shipper:10514;ls_json
|
||||
Reference in New Issue
Block a user