Skip to content

Instantly share code, notes, and snippets.

@jenting
Created May 16, 2019 03:08
Show Gist options
  • Save jenting/2cce0f971761ef9363bdf49c474c2dfd to your computer and use it in GitHub Desktop.
Save jenting/2cce0f971761ef9363bdf49c474c2dfd to your computer and use it in GitHub Desktop.
rsyslog server (RFC3164/RFC5424)
# Module
module(
load="imudp"
)
module(
load="imtcp"
MaxSessions="2000"
)
# Input
input(
type="imudp"
Port="1514"
Ruleset="udp"
)
input(
type="imtcp"
Port="1514"
Ruleset="tcp"
)
# Rules
ruleset(name="udp") {
action(
type="omfile"
dirCreateMode="0700"
FileCreateMode="0644"
File="/var/log/messages-udp-rfc3164"
)
action(
type="omfile"
Template="RSYSLOG_SyslogProtocol23Format"
dirCreateMode="0700"
FileCreateMode="0644"
File="/var/log/messages-udp-rfc5424"
)
}
ruleset(name="tcp") {
action(
type="omfile"
dirCreateMode="0700"
FileCreateMode="0644"
File="/var/log/messages-tcp-rfc3164"
)
action(
type="omfile"
Template="RSYSLOG_SyslogProtocol23Format"
dirCreateMode="0700"
FileCreateMode="0644"
File="/var/log/messages-tcp-rfc5424"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment