Heyy! I'm newbie with Logstash so I need some help here with a filter done in .rb file. Situation:
-
I'm reading from csv file a code, for example 1500.
-
Then, in filter I use a ruby file to look for that 1500 as a key inside a json file. With read data, I set two events that should be written in the output.
-
Most of output lines are right, but sometimes key and read data got mixed between some lines. Looking the log, I saw the problem used to be that one output row has the .json data from the next one. I logged the .rb file searches and all key-value are correctly read from .json file, so the problem should be with the speed it writes the output.
I tried to return read data with return from .rb file, but I couldn't. So I thought maybe I can make the output wait for the event overwritten or something similar, but I prefer to ask for the better practice as I'm learning.
Thank you and regards!