Properties file read in Logstash

my scenario is
I have a property file. in which data is in below format
key = value
abc=123
xyz=456

in logstash when I am processing logs, each log line has a key. Now I need to add a field whose value is from properties file based on key from log.

For Ex.
log has key "abc". while processing logs, logstash should add field value "123". if it is "xyz" then value should be 456
I am using version 5.4.1

Have a look at the translate filter. It won't read property files but it's trivial to convert a property file into a format that it does accept.

Thanks for your reply. it worked for me.

Regards

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