标签:
最常用的两个输出插件:
一、redis
1、用法
1 output { 2 redis{ 3 batch => false 4 batch_events => 50 5 batch_timeout => 5 6 codec => plain 7 congestion_interval => 1 8 congestion_threshold => 0 9 data_type => list 10 db => 0 11 host => ["127.0.0.1:6379"] 12 key => xxx 13 password => xxx 14 port => 6379 15 reconnect_interval => 1 16 shuffle_hosts => true 17 timeout => 5 18 workers => 1 19 } 20 }
2、配置项
以上所有配置项都是可选的,没有必须的。(以下4个红色配置是最重要的4个配置)
二、es
1、使用方式
1 output { 2 elasticsearch { 3 hosts => ["127.0.0.1:9200"] 4 action => index 5 cacert => /xxx 6 codec => plain 7 doc_as_upsert => false 8 document_id => 1 9 document_type => xxx 10 flush_size => 500 11 idle_flush_time => 1 12 index => logstash-%{+YYYY.MM.dd} 13 keystore => /xxx 14 keystore_password => xxx 15 manage_template => true 16 max_retries => 3 17 parent => nil 18 password => xxx 19 path => / 20 proxy => xxx 21 retry_max_interval => 2 22 routing => xxx 23 script => xxx 24 script_lang => xxx 25 script_type => inline 26 script_var_name => event 27 scripted_upsert => false 28 sniffing => false 29 sniffing_delay => 5 30 ssl => false 31 ssl_certificate_verification => true 32 template => /xxx 33 template_name => logstash 34 template_overwrite => false 35 timeout => 5 36 truststore => /xxx 37 truststore_password => xxx 38 upsert => xxx 39 user => xxx 40 workers => 1 41 } 42 }
2、基本配置
以上配置全部都是可选的,没有必须的。以下列出最重要的几个。
index
, delete
, create
, update
标签:
原文地址:http://www.cnblogs.com/java-zhao/p/5886481.html