Hell I'm new with elasticSearch and logstahs and I'm having some problems.
I'm Trying to connect Logstash and ES with a simple conf file but nothing happens in ES and I can get the error from the logs.
input {
file{
path => ["/Users/asanzgarrigues/Desktop/logstash-plain.log"]
start_position => "beginning"
type => "logs"
}
}
# The filter part of this file is commented out to indicate that it is
# optional.
# filter {
#
# }
output {
elasticsearch {
hosts => ["http://localhost:9203"]
action => "index"
index => "prueba"
}
stdout { codec => rubydebug }
}
The ES port is 9203 and I change it in the Elasticsearch.yml configuration file.
When I executed logstahs with:
C:\Users\asanzgarrigues\Desktop\elastic\logstash-5.3.0\bin>logstash -f prueba.conf
I get the following response:
Sending Logstash's logs to C:/Users/asanzgarrigues/Desktop/elastic/logstash-5.3.0/logs which is now configured via log4j2.properties
[2017-04-27T10:13:59,271][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://localhost:9203/]}}
[2017-04-27T10:13:59,271][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9203/, :path=>"/"}
[2017-04-27T10:13:59,458][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>#<URI::HTTP:0x78fe632b URL:http://localhost:9203/>}
[2017-04-27T10:13:59,458][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2017-04-27T10:13:59,521][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-", "version"=>50001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"_all"=>{"enabled"=>true, "norms"=>false}, "dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword"}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date", "include_in_all"=>false}, "@version"=>{"type"=>"keyword", "include_in_all"=>false}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2017-04-27T10:13:59,536][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::Elasticsearch", :hosts=>[#<URI::HTTP:0x5fd8227c URL:http://localhost:9203>]}
[2017-04-27T10:13:59,536][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500}
[2017-04-27T10:14:00,593][INFO ][logstash.pipeline ] Pipeline main started
[2017-04-27T10:14:00,749][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
The execution with --debug is too big but it finalizes in a loop like this:
[2017-04-27T10:18:56,055][DEBUG][logstash.inputs.file ] _globbed_files: /Users/asanzgarrigues/Desktop/logstash-plain.log: glob is: ["/Users/asanzgarrigues/Desktop/logstash-plain.log"]
[2017-04-27T10:19:00,764][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-04-27T10:19:05,766][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-04-27T10:19:10,774][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-04-27T10:19:11,125][DEBUG][logstash.inputs.file ] _globbed_files: /Users/asanzgarrigues/Desktop/logstash-plain.log: glob is: ["/Users/asanzgarrigues/Desktop/logstash-plain.log"]
[2017-04-27T10:19:15,781][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-04-27T10:19:20,788][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-04-27T10:19:25,793][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-04-27T10:19:26,196][DEBUG][logstash.inputs.file ] _globbed_files: /Users/asanzgarrigues/Desktop/logstash-plain.log: glob is: ["/Users/asanzgarrigues/Desktop/logstash-plain.log"]
If the complete debug log is necessary i can post it in various posts
I need your help, I'm blocked with it.
Thank you!