2007-09-12 21:38:51 +00:00
|
|
|
# Generic configuration items (to be used as interpolations) in other
|
|
|
|
# filters or actions configurations
|
|
|
|
#
|
|
|
|
|
|
|
|
[INCLUDES]
|
|
|
|
|
|
|
|
# Load customizations if any available
|
2008-03-04 00:17:56 +00:00
|
|
|
after = common.local
|
2007-09-12 21:38:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
[DEFAULT]
|
|
|
|
|
2019-07-09 19:47:51 +00:00
|
|
|
# Type of log-file resp. log-format (file, short, journal, rfc542):
|
2019-03-28 20:14:02 +00:00
|
|
|
logtype = file
|
|
|
|
|
2007-09-12 21:38:51 +00:00
|
|
|
# Daemon definition is to be specialized (if needed) in .conf file
|
|
|
|
_daemon = \S*
|
|
|
|
|
|
|
|
#
|
|
|
|
# Shortcuts for easier comprehension of the failregex
|
|
|
|
#
|
|
|
|
# PID.
|
|
|
|
# EXAMPLES: [123]
|
|
|
|
__pid_re = (?:\[\d+\])
|
|
|
|
|
|
|
|
# Daemon name (with optional source_file:line or whatever)
|
|
|
|
# EXAMPLES: pam_rhosts_auth, [sshd], pop(pam_unix)
|
2020-03-05 12:47:11 +00:00
|
|
|
__daemon_re = [\[\(]?<_daemon>(?:\(\S+\))?[\]\)]?:?
|
2007-09-12 21:38:51 +00:00
|
|
|
|
2013-04-29 20:14:36 +00:00
|
|
|
# extra daemon info
|
|
|
|
# EXAMPLE: [ID 800047 auth.info]
|
2016-05-13 18:07:19 +00:00
|
|
|
__daemon_extra_re = \[ID \d+ \S+\]
|
2013-04-29 20:14:36 +00:00
|
|
|
|
2007-09-12 21:38:51 +00:00
|
|
|
# Combinations of daemon name and PID
|
|
|
|
# EXAMPLES: sshd[31607], pop(pam_unix)[4920]
|
2020-03-05 12:47:11 +00:00
|
|
|
__daemon_combs_re = (?:<__pid_re>?:\s+<__daemon_re>|<__daemon_re><__pid_re>?:?)
|
2007-09-12 21:38:51 +00:00
|
|
|
|
2011-09-25 11:58:13 +00:00
|
|
|
# Some messages have a kernel prefix with a timestamp
|
|
|
|
# EXAMPLES: kernel: [769570.846956]
|
2019-03-29 13:11:57 +00:00
|
|
|
__kernel_prefix = kernel:\s?\[ *\d+\.\d+\]:?
|
2011-09-25 11:58:13 +00:00
|
|
|
|
|
|
|
__hostname = \S+
|
|
|
|
|
2013-09-30 23:03:33 +00:00
|
|
|
# A MD5 hex
|
|
|
|
# EXAMPLES: 07:06:27:55:b0:e3:0c:3c:5a:28:2d:7c:7e:4c:77:5f
|
|
|
|
__md5hex = (?:[\da-f]{2}:){15}[\da-f]{2}
|
2013-05-07 20:32:27 +00:00
|
|
|
|
2013-05-08 14:30:04 +00:00
|
|
|
# bsdverbose is where syslogd is started with -v or -vv and results in <4.3> or
|
|
|
|
# <auth.info> appearing before the host as per testcases/files/logs/bsd/*.
|
2016-05-13 18:07:19 +00:00
|
|
|
__bsd_syslog_verbose = <[^.]+\.[^.]+>
|
2013-05-07 20:32:27 +00:00
|
|
|
|
2016-05-19 15:01:44 +00:00
|
|
|
__vserver = @vserver_\S+
|
|
|
|
|
|
|
|
__date_ambit = (?:\[\])
|
2016-05-17 09:33:49 +00:00
|
|
|
|
2007-09-12 21:38:51 +00:00
|
|
|
# Common line prefixes (beginnings) which could be used in filters
|
|
|
|
#
|
2013-04-29 21:48:01 +00:00
|
|
|
# [bsdverbose]? [hostname] [vserver tag] daemon_id spaces
|
|
|
|
#
|
|
|
|
# This can be optional (for instance if we match named native log files)
|
2019-07-09 19:47:51 +00:00
|
|
|
__prefix_line = <lt_<logtype>/__prefix_line>
|
2007-09-12 21:38:51 +00:00
|
|
|
|
2015-01-27 21:34:27 +00:00
|
|
|
# PAM authentication mechanism check for failures, e.g.: pam_unix, pam_sss,
|
|
|
|
# pam_ldap
|
|
|
|
__pam_auth = pam_unix
|
|
|
|
|
2016-10-05 17:34:21 +00:00
|
|
|
# standardly all formats using prefix have line-begin anchored date:
|
2019-07-09 19:47:51 +00:00
|
|
|
datepattern = <lt_<logtype>/datepattern>
|
|
|
|
|
|
|
|
[lt_file]
|
|
|
|
# Common line prefixes for logtype "file":
|
2020-03-05 12:47:11 +00:00
|
|
|
__prefix_line = <__date_ambit>?\s*(?:<__bsd_syslog_verbose>\s+)?(?:<__hostname>\s+)?(?:<__kernel_prefix>\s+)?(?:<__vserver>\s+)?(?:<__daemon_combs_re>\s+)?(?:<__daemon_extra_re>\s+)?
|
2016-10-05 17:34:21 +00:00
|
|
|
datepattern = {^LN-BEG}
|
|
|
|
|
2019-07-09 19:47:51 +00:00
|
|
|
[lt_short]
|
|
|
|
# Common (short) line prefix for logtype "journal" (corresponds output of formatJournalEntry):
|
2020-03-05 12:47:11 +00:00
|
|
|
__prefix_line = \s*(?:<__hostname>\s+)?(?:<_daemon><__pid_re>?:?\s+)?(?:<__kernel_prefix>\s+)?
|
2019-07-09 19:47:51 +00:00
|
|
|
datepattern = %(lt_file/datepattern)s
|
|
|
|
[lt_journal]
|
|
|
|
__prefix_line = %(lt_short/__prefix_line)s
|
|
|
|
datepattern = %(lt_short/datepattern)s
|
|
|
|
|
|
|
|
[lt_rfc5424]
|
|
|
|
# RFC 5424 log-format, see gh-2309:
|
|
|
|
#__prefix_line = \s*<__hostname> <__daemon_re> \d+ \S+ \S+\s+
|
|
|
|
__prefix_line = \s*<__hostname> <__daemon_re> \d+ \S+ (?:[^\[\]\s]+|(?:\[(?:[^\]"]*|"[^"]*")*\])+)\s+
|
|
|
|
datepattern = ^<\d+>\d+\s+{DATE}
|
|
|
|
|
|
|
|
# Author: Yaroslav Halchenko, Sergey G. Brester (aka sebres)
|