Need to parse logs and enrich some values from mysql data at logstats

Need to parse logs on logstash and enrich some values from mysql db based on the log message and generate json message .

e.x JOB application_1603918538928_3286731 QUEUE default USER xyz

Need to fetch details of USER : xyz from db and append with the message in json format.

You can enrich an event with data from a database using either the jdbc_static or jdbc_streaming filter, depending on your use case. If you want to output messages in json format you can use a json codec on the output.

@Badger, can we do this on java filter as well?

If you are asking whether you could write a filter in java that does this then the answer is yes.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.