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"
        ]
    }

  • 相关阅读:
    http简单demo
    启迪思维:循环链表
    数据表行列转换
    防止短时间内重复提交表单数据js约束
    ASP.NET2.0文件上传以及图片处理
    支付宝倒计时代码
    js 定时刷新页面
    C# 将cookiecontainer写到本地
    用C#生成随机中文汉字验证码的基本原理
    删除指定文件夹里的所有文件
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349654.html
Copyright © 2011-2022 走看看