The results of message classification and parsing can be used in custom
filters and file and database templates as well. There are two built-in macros
in syslog-ng that allow you to use the results of the classification: the
.classifier.class macro contains the class assigned
to the message (e.g., violation, security, or unknown), while the
.classifier.rule_id macro contains the identifier of
the message pattern that matched the message.
The message-segments parsed by the pattern parsers can also be used as macros as well. To accomplish this, you have to add a name to the parser, and then you can use this name as a macro that refers to the parsed value of the message.
![]() |
Note |
|---|---|
|
The above macros can be used in database columns and filename templates as well, if you create custom templates for the destination or logspace. Use a consistent naming scheme for your macros, for example,
|
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com