一、Source Interceptors
接下里我们看一下第一个高级组件,Source Interceptors
系统中已经内置提供了很多Source Interceptors
常见的Source Interceptors类型:Timestamp Interceptor、Host Interceptor、Search and Replace Interceptor 、Static Interceptor、Regex Extractor Interceptor 等
1、Timestamp Interceptor:向event中的header里面添加timestamp 时间戳信息
2、Host Interceptor:向event中的header里面添加host属性,host的值为当前机器的主机名或者ip
3、Search and Replace Interceptor:根据指定的规则查询Event中body里面的数据,然后进行替换,这个拦截器会修改event中body的值,也就是会修改原始采集到的数据内容
4、Static Interceptor:向event中的header里面添加固定的key和value
5、Regex Extractor Interceptor:根据指定的规则从Event中的body里面抽取数据,生成key和value,再把key和value添加到header中
根据刚才的分析ÿ