Could you describe a bit more what exactly you expect to happen?
What is the source data?
What do you want to do in the filter section?
What is the output?
To start, it would be normal input from json file.
Next at filter, I have ruby script to manipulate the data from input to only select fields I want
At the ruby script, I need to access sqlite to check on source and destination IP (I have a map of IP to name). Once I get the name, new field will be added before inserting to Elasticsearch
So, the problem I'm having now is accessing sqlite at ruby script.
I'm on very weak ice here so this is pure speculation. I don't know much Ruby...
I do not think Logstash needs to load the sqlite3 gem, so I would remove the init specification. I imagine the require 'sqlite3' goes in the .rb script.
I would also use a fully qualified path to the .rb script as I am not entirely sure what Logstash sees at the working path.
Without seeing the Ruby script it is hard (at least for me) to say anything more than that.
Well, I did try with require 'sqlite3' at .rb file. But it gives error.
On top of that, I wouldn't want my script to require sqlite at every event. So, that is the reason I require it at init
Thanks for your insight. Couldn't find anywhere regarding this matter. Only thing Logstash have with sqlite3 is the input plugin.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.