This is what my log file looks like:
[3/12/18 5:28:05:364 EDT] 00000056 AutowiredAnno I org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
and used the following grok pattern:
grok{
match => { "message" => "%{DATESTAMP:TIMESTAMP} EDT] %{WORD:ID} %{WORD:CLASS} %{WORD:event_type} %{GREEDYDATA:MSG}" }
}
Logstash pipeline starts but i dont see any logs being parsed.
hi magnus,
i made the changes as you said but the logs are not getting parsed.(the pipeline starts but nothing happens after that)
here is my full configuration:
Sending Logstash's logs to C:/logstash-5.4.1/logs which is now configured via log4j2.properties
[2018-05-23T12:05:36,500][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2018-05-23T12:05:36,508][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2018-05-23T12:05:36,717][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>#<URI::HTTP:0x36a1f3ad URL:http://localhost:9200/>}
[2018-05-23T12:05:36,724][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2018-05-23T12:05:36,853][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"}}}}}}}}
[2018-05-23T12:05:36,879][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>[#<URI::Generic:0x7d51463d URL://localhost>]}
[2018-05-23T12:05:36,961][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500}
[2018-05-23T12:05:37,552][INFO ][logstash.pipeline ] Pipeline main started
[2018-05-23T12:05:37,742][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
pipe line gets started but the logs are not parsed
[3/12/18 5:28:05:364 EDT] 00000056 AutowiredAnno I org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
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.