input { 
Redis { 
#redis地址 
host => “1.1.1.1” 
#端口 
port => “6379” 
#数据库号 
db => “5” 
#密码 
password => “foobared” 
#数据类型 
data_type => “list” 
#Key 
key => “tomcat_access_log” 


output { 
#如果tags里面包含tomcat_access_log则执行里面内容 
if “tomcat_access_log” in [tags] { 
#输出到es 
elasticsearch { 
#格式为json格式 
codec => “json” 
#es地址 
hosts => [“1.1.1.2:9200”,”1.1.1.3:9200”,”11.1.1.4:9200”] 
#索引 
index => “tomcat_access_log-%{+YYYY.MM.dd}” 

#输出到标准输出 
stdout { codec => rubydebug } 

}

 
 

相关文章:

  • 2021-11-04
  • 2021-11-16
  • 2021-09-26
  • 2021-12-31
  • 2021-07-02
  • 2021-12-06
  • 2021-05-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2021-08-07
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案