4

logstash输入(1)通用选项

 2 years ago
source link: https://wakzz.cn/2019/01/16/logstash/%E8%BE%93%E5%85%A5(1)%E9%80%9A%E7%94%A8%E9%80%89%E9%A1%B9/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

logstash输入(1)通用选项

祈雨的博客
2019-01-16

参数 类型 是否必须 默认值

add_field hash No {}

codec codec No line

tags array No

type string No

add_field

向输入的事件内容添加字段,如下:

input{
xxx {
add_field => {"project"=>"kibana"}
add_field => {"client"=>"wakzz.cn"}
}
}

codec

输入事件内容的编码器,默认值为line,即每行输入读取为一个事件。

input{
xxx {
codec => "line"
}
}

tags的值为数值,可添加任意数量的任意标签,助于以后的数据处理。

input{
xxx {
tags => ["add"]
}
}

type主要用于过滤器的触发。

input{
xxx {
type => "add"
}
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK