Dear Team,
We are using fluentd in our development environment and we have some specific use-case, and like to know whether its possible using parser plugin or any other plugin.
We are reading our logs using in-tail plugin and we know if we use in-tail then parser or format is mandatory to use.
The following is our sample log from our application
Sample log:
timestamp="2018-05-25 13:36:38.802" application="xyz" category="MessagingEvent" messagingEventType="MessageReceived" messageType="Demand" barcode="323200023884776648484"
Regex used for parsing:
^timestamp=(?<timestamp>[^ ]* [^ ]*) application=(?<application>(...)*) *category=(?<Category>\S*) *messagingEventType=(?<messagingEventType>\S*) *messageType=(?<messageType>\S*) *barcode=(?<barcode>\S*)
output:
We are able to get the following key, value records.
timestamp "2018-05-25 13:36:38.802"
application "xyz"
Category "MessagingEvent"
messagingEventType "MessageReceived"
messageType "Demand"
barcode "323200023884776648484"
Query:
Mostly of our application logs format will be similar only the key names might change, so is there a way to parse the log with existing plugin using generic regex(/((\w+)="([^"]+)"+)/) to get key/value records without writing a custom parser plugin.
Regards,
Raj