标签:output lte eve stash tput ash ice logstash get
logstash 的配置文件添加
filter {
ruby {
code => "event.set(‘timestamp‘, event.get(‘@timestamp‘).time.localtime + 8*60*60)"
}
ruby {
code => "event.set(‘@timestamp‘,event.get(‘timestamp‘))"
}
mutate {
remove_field => ["timestamp"]
}
}
这样output 输出的时间才是正确的,前提服务器时区已经修改了
output:
file{
path => "/data/logs/service/stdout-%{+YYYY-MM-dd-HH}.log"
codec => line {
format => "%{message}"
}
}
标签:output lte eve stash tput ash ice logstash get
原文地址:https://www.cnblogs.com/already/p/10783138.html