Hello,
I'm new with elasticsearch and I'm trying to import csv data with logstash in Windows 10.
The configuration file i'm using for logstash is "csv-config.conf":
input {
file {
path => "/Users/asanzgarrigues/Desktop/test2.csv"
start_position => "beginning"
}
}
filter {
csv {
separator => ","
columns => ["PacketId","MACAddress","Date","PacketLength","SourceIP","SourcePort","DestIP","DestPort"]
}
}
output {
elasticsearch {
hosts => ["localhost:9203"]
action => "index"
index => "test"
}
stdout {codec => rubydebug}
}
When I execute the command:
logstash -f csv-config.conf
the response is the following:
It looks like the index have been created(or at least I think so) but when I search for my index with kibana or elasticsearch nothing appears.
I changed the elasticsearch port to 9203 because 9200 was not working.
Additonaly, the file log4j2 is located in the correct path but logstash doesn't recognize it.
Edit: I solved the problem of log4j2, the problem was in the file runner.rb (logstash-5.3.0\logstash-core\lib\logstash\runner.rb) at the line:
LogStash::Logging::Logger::initialize("file://" + log4j_config_location)
that line should be replaced by:
LogStash::Logging::Logger::initialize("file:///" + log4j_config_location)
I also try to use the debug mode to get more information about the problem but I don't get nothing clear.
Thnak you for help!