Combining parsers can currently be done in syslog-ng.conf simply by chaining.
This can be used for instance to have patterndb parse MSG, then csv-parser parse custom-key-from-pdb.
However, this would happen for all messages, unless creating a filter that would match messages from that particular rule.
IMHO it would make sense to be able to do this in patterndb itself, e.g. using this mockup pattern:
csv follows in quotes: @PARSER:csv-parser:QSTRING:custom-key:"@ other stuff
So this would make QSTRING extract the custom-key, and pass it to the csv-parser.
Sorry, couldn't find a sane syntax, but I hope you get the idea
I talked with @faxm0dem about this topic. With this patterndb would be able to parse the whole message without depending on the parsers defined in syslog-ng.conf.
Combining parsers can currently be done in
syslog-ng.conf
simply by chaining. This can be used for instance to have patterndb parseMSG
, then csv-parser parsecustom-key-from-pdb
. However, this would happen for all messages, unless creating a filter that would match messages from that particular rule.IMHO it would make sense to be able to do this in patterndb itself, e.g. using this mockup pattern:
So this would make
QSTRING
extract thecustom-key
, and pass it to the csv-parser. Sorry, couldn't find a sane syntax, but I hope you get the idea