常用的输入插件:
- tcp
- redis
一、tcp
1、用法
1 input { 2 tcp { 3 port => 4560 4 codec => json_lines 5 mode => server 6 host => 0.0.0.0 7 add_field => {"xxx":"xxx"} 8 ssl_cert => /xxx 9 ssl_enable => false10 ssl_extra_chain_certs => ["xxx"]11 ssl_key => /xxx12 ssl_key_passphrase => nil13 ssl_verify => true14 tags => ["xxx"]15 type => xxx16 }17 }
2、常用配置
以上port是必选项,其他是可选项。
二、redis
1、用法
1 input { 2 redis { 3 data_type => list 4 port => 6379 5 codec => json 6 db => 0 7 host => 127.0.0.1 8 add_field => {"xxx":"xxx"} 9 key => xxx10 password => xxx11 threads => 112 timeout => 513 batch_count => 114 tags => ["xxx"]15 type => xxx16 }17 }
2、配置
以上选项全部为可选项。
- data_type:
- list:blpop
- channel:subscribe
- pattern_channel:psubscribe
- type:主要用于过滤