Properties file read in Logstash


(gaurav kant) #1

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


(Magnus B├Ąck) #2

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.


(gaurav kant) #3

Thanks for your reply. it worked for me.

Regards


(system) #4

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