Selenium.
2020-08-06 10:17
采纳率: 0%
浏览 652

logstash启动成功,但是elasticsearch中未创建索引。

logstash.conf

input{
  file{
    path => "/data/logs/test.log"
    start_position => "beginning"
  }
}

output{
   stdout{ codec=> rubydebug}
   elasticsearch{
       hosts => ["172.25.78.44:9200"]
       index => "logs"
   }
}

docker启动命令:

 docker run -itd --name logstash -v  /data/logs/test.log:/data/logs/test.log -v /data/elk/logstash/config/logstash.conf:/usr/share/logstash/config/logstash.conf logstash:5.6.9 -f /usr/share/logstash/config/logstash.conf

logstash启动日志:

20:55:18.443 [main] INFO  logstash.modules.scaffold - Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
20:55:18.470 [main] INFO  logstash.modules.scaffold - Initializing module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
20:55:20.001 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://172.25.78.44:9200/]}}
20:55:20.002 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://172.25.78.44:9200/, :path=>"/"}
20:55:20.227 [[main]-pipeline-manager] WARN  logstash.outputs.elasticsearch - Restored connection to ES instance {:url=>"http://172.25.78.44:9200/"}
20:55:20.698 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - Using mapping template from {:path=>nil}
20:55:20.709 [[main]-pipeline-manager] 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", "ignore_above"=>256}}}}}], "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"}}}}}}}}
20:55:20.727 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//172.25.78.44:9200"]}
20:55:20.729 [[main]-pipeline-manager] INFO  logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
20:55:21.451 [[main]-pipeline-manager] INFO  logstash.pipeline - Pipeline main started
20:55:21.640 [Api Webserver] INFO  logstash.agent - Successfully started Logstash API endpoint {:port=>9600}

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题