Rsyslog

La conf de rsyslog, c'est cool, mais la doc est a chier, elle manque principalement d'exemples.

Checker la configuration

rsyslogd -N1

Chunk of codes:

# Dynamic file name
template (name="fileNetworkDevices" type="string" string="/var/lib/rsyslog/clients/%HOSTNAME%.log")
template (name="fileNetworkDevicesDebug" type="string" string="/var/lib/rsyslog/clients/%HOSTNAME%.log_debug")

# Debug log format
template (name="formatDebug" type="list") {
    property(name="jsonmesg")
    constant(value="\n")
}


# Rules
# #############################

# Debug: To debug messages, uncomments those lines
if $hostname != $myhostname then ?fileNetworkDevicesDebug;formatDebug
#& ~

# Dump all network logs into thos dynamic files names, and discard messages
if $hostname != $myhostname then ?fileNetworkDevices
& ~
Page last modified on March 16, 2017, at 09:17 PM EST