When I run Logstash with the debug option, I get the following error and no data is transferred:
NoMethodError: undefined method 'to_hash' for []:Array
filter_func at (eval):22
filter_batch at .../pipeline.rb:398
worker_loop at ...
start_workers at ...
How can I fix this? I'll be thankful for any help.
I am also having a similar issue. Here is the Debug output and configuration file I was using. When I don't use teh --log.level=debug option, LogStash seems to work, but doesn't exit, and when I use the debug option, it actually fails to start and run.
Without the debug flag, LogStash seems to just sit and wait for something, but it doesn't actually parse the CSV file I've given it. When I look at the process, it does seem to have a lock on the file though.
This happened to me when I upgraded to 5.6.3 as well. The CSV plugin worked fine for me in 5.3 before I upgraded. I'll try downgrading to 5.6.1 and see if that solves my problem.
Oddly enough, I turned off debugging (I had it set on the command line I was using for test purposes) and the CSV to_hash errors went away. I was finally able to get my data slurped in from logstash!
I ended up writing a Ruby script that slurped the CSV, and parsed it, then POST'ed it to Elasticsearch. However, I think that LogStash might have not processed my CSV because some of hte columns had new line characters in the string in a few of those columns.
However, since LogStash is written in JRuby, it should've been able to do the same thing.
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.