Windows2008 安装java1.8,配置系统环境变量:
官方下载并安装略...然后配置 logstash的配置文件 注意PATH路径名称不支持中文
input { file { type => "service50-online" path => [ "D:c_siteservice.xxx.comerrlogsonline/*.txt" ] codec => multiline { pattern => "^2017" negate => true what => "previous" }} } output { if [type] == "service50-online" { elasticsearch { codec => plain{ charset => "UTF-8" } hosts => ["192.168.x.164:9200"] index => "service50-online-%{+YYYY.MM.dd}" }} }
然后启动logstash如下: