logstash在Windows2008简单配置实例

时间:2024-11-12 17:33:50

Windows2008 安装java1.8,配置系统环境变量:

logstash在Windows2008简单配置实例

logstash在Windows2008简单配置实例

官方下载并安装略...然后配置 logstash的配置文件 注意PATH路径名称不支持中文

input {
file {
type => "service50-online"
path => [ "D:\bc_site\service.xxx.com\errlogs\online/*.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如下:

logstash在Windows2008简单配置实例