view prototype.toml @ 14:e101908dc688 draft

Extend prototype config
author Lewin Bormann <lbo@spheniscida.de>
date Sat, 03 Dec 2016 14:16:24 +0100
parents 2b42f97b88f1
children eae478565a9f
line wrap: on
line source

# Example configuration file.

[general]
# All possible options are set here
max_msg_len = 2048
bind_path = "/dev/log"


[remotes]
[remotes.main]
# All possible options are set here
addr = "10.0.0.2"
port = 538

[files]
[files.messages]
# All possible options are described here

file = "/var/log/messages"
# e.g. "1k" "2M" "3G" default: 4M
max_size = "2048k"
# how many old files to keep; default = 10
history = 7

[files.maillog]
file = "/var/log/mail.log"
# e.g. "1h" "2d" "3w"
max_age = "7d"

[files.infolog]
file = "/var/log/info.log"
# how to compress old files. Possible values: "none" "gzip"
compress = "gzip"

# #####################
# Rules are evaluated in the defined order.
# This means that the same message can end up in several destinations.
# 
# A pattern consists of one or more filters, separated by ';'.
# A filter consists of one or more facilities, a dot ('.'), and one or more levels.
# A facility is kern/user/mail/daemon/auth/syslog/lpr/news/uucp/cron/authpriv/ftp or local0..local7;
#   multiple facilities are separated by ','.
# 
# A level is none/emerg/alert/crit/err/warn/notice/info/debug; multiple levels are separated by ','.
#   A single level matches all levels that are more important than itself and itself (crit matches crit, alert and emerg).
#   A single level prefixed by '=' matches only that level ('=crit' matches only crit).
#
# The evaluation order inside a pattern is left-to-right; as soon as a filter matches, the pattern matches.
#
# If a rule has the stop property set to 'true', then evaluation stops if the pattern matched.
[[rules]]
pattern = "lpr.*"
# null refers to the special null destination, which sends messages to /dev/null.
dest = "null"

[[rules]]
pattern = "mail,news.*"
# One destination can be referenced in multiple rules.
dest = "maillog"
# stop evaluation after this rule. Default is fall-through.
# i.e., make sure log messages from the mail and news systems ONLY end up in maillog, and nowhere else.
stop = true

[[rules]]
pattern = "*.info"
dest = "infolog"

[[rules]]
pattern = "*.*"
dest = "messages"

[[rules]]
pattern = "auth.*"
remote_dest = "main"