码迷,mamicode.com
首页 > 其他好文 > 详细

logstash日志收集

时间:2019-03-27 12:52:58      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:ice   sea   inpu   pat   elastic   search   code   log   pre   

input {
file {
path => "/home/nflow/logs/nisp-service/nisp-service.log"
type => "nisp-servvice"
start_position => "end"
stat_interval => "1"
type => ‘nisp-servvice‘
tags => ["nisp-servvice"]
codec => multiline {
pattern => "^\d"
negate => "true"
what => "previous"
}
}
}
output {
if [type] == "nisp-servvice" {
elasticsearch {
hosts => ["172.16.249.3:9400"]
index => "nisp-servvice-log-%{+YYYY.MM.dd}"
codec => "json"
}}
}

logstash日志收集

标签:ice   sea   inpu   pat   elastic   search   code   log   pre   

原文地址:https://blog.51cto.com/wsxxsl/2369795

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!