zoukankan      html  css  js  c++  java
  • 第三章 logstash

    常用的输入插件:

    • 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 => false
    10         ssl_extra_chain_certs => ["xxx"]
    11         ssl_key => /xxx
    12         ssl_key_passphrase => nil
    13         ssl_verify => true
    14         tags => ["xxx"]
    15         type => xxx
    16     }
    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 => xxx
    10         password => xxx
    11         threads => 1
    12         timeout => 5
    13         batch_count => 1
    14         tags => ["xxx"]
    15         type => xxx
    16     }
    17 }

    2、配置

    以上选项全部为可选项。

    • data_type:
      • list:blpop
      • channel:subscribe
      • pattern_channel:psubscribe
    • type:主要用于过滤
  • 相关阅读:
    030-B+树(三)
    028-B+树(一)
    027-B树(二)
    026-B树(一)
    025-红黑树(六)
    024-红黑树(五)
    023-红黑树(四)
    022-红黑树(三)
    021-红黑树(二)
    020-红黑树(一)
  • 原文地址:https://www.cnblogs.com/java-zhao/p/5887174.html
Copyright © 2011-2022 走看看