zoukankan      html  css  js  c++  java
  • logstash 区分多个文件index端配置

    [elk@rsyslog logstash]$ cat logstash_weblogic_access_log_index.conf 
    input {
    
            redis {
                    host => "10.4.145.93"
                    data_type => "list"
                    key => "weblogic_10.4.32.111_access:redis"
                    password => "1234567"
                    port =>"6379"
            }
    
    
                redis {
                    host => "10.4.145.93"
                    data_type => "list"
                    key => "weblogic_10.4.32.48_access:redis"
                    password => "1234567"
                    port =>"6379"
            }
    
           
    
    
    
    
    }
    output {
            elasticsearch {
                    hosts => "10.4.145.93:9200"
                    index => "logstash-%{type}-%{+YYYY.MM.dd}"
            }
    		stdout {
    			codec => rubydebug
    		}
          }  
    
    
    [elk@rsyslog hdxt]$ echo "10.4.32.111--tlcb88888" >> weblogic-10.4.32.111-access.2017-03-18
    
    
    {
          "@version" => "1",
        "@timestamp" => "2017-07-05T01:21:40.880Z",
              "path" => "/data01/hdxt/weblogic-10.4.32.111-access.2017-03-18",
              "host" => "rsyslog",
              "type" => "weblogic_10.4.32.111_access",
          "messages" => "weblogic_10.4.32.111_access-10.4.32.111--tlcb88888",
              "tags" => [
            [0] "_grokparsefailure"
        ]
    }
    
    [elk@rsyslog logstash]$ logstash -f logstash_weblogic_access_log_index.conf 
    Settings: Default pipeline workers: 4
    Pipeline main started
    {
          "@version" => "1",
        "@timestamp" => "2017-07-05T01:21:40.880Z",
              "path" => "/data01/hdxt/weblogic-10.4.32.111-access.2017-03-18",
              "host" => "rsyslog",
              "type" => "weblogic_10.4.32.111_access",
          "messages" => "weblogic_10.4.32.111_access-10.4.32.111--tlcb88888",
              "tags" => [
            [0] "_grokparsefailure"
        ]
    }

  • 相关阅读:
    vmware安装ubuntu
    加快pip install的速度
    在Dataframe中寻找特定值所在行的行号
    后续:尝试交易策略
    小实验:股票涨幅日间的相关性
    大数据之数据预处理
    并查集
    2020华为杯数学建模B题-RON建模 赛后总结与分析
    二叉树的遍历总结
    几数之和分析,解法,优化和总结
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349654.html
Copyright © 2011-2022 走看看