Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dbparser: Implement a template() option for the parser
Similar to the csv-parser(), this patch makes dbparser() accept a template() option, that can be used to tell the parser what to parse instead of the MESSAGE part (which it does by default). This allows one to conveniently chain parsers together, assembling one parser's output into an input template for another, without the need for complicated rewrites: ,---- | parser p_step1 { | csv-parser(columns("timestamp", "host", "app", "instance", "session", "message")); | }; | | parser p_step2 { | db-parser(file("etc/patterndb.d/step2.xml") | template("${session}: ${message}")); | }; | | log { | source(...); | parser(p_step1); | parser(p_step2); | destination(...); | }; `---- This patch makes this config work, so that the db-parser() will operate on the given template, instead of $MESSAGE. Signed-off-by: Balazs Scheidler <bazsi@balabit.hu> Signed-off-by: Gergely Nagy <algernon@balabit.hu>
- Loading branch information
Showing
7 changed files
with
75 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters