• tag_on_failure => [] # prevent default _grokparsefailure tag on real records


    [elk@zjtest7-frontend config]$ cat stdin04.conf 
    input {
        stdin {
        }
    }
    filter {
      # drop sleep events
      grok {
        match => { "message" => "SELECT SLEEP" }
        add_tag => [ "sleep_drop" ]
    #    tag_on_failure => [] # prevent default _grokparsefailure tag on real records
      }
      if "sleep_drop" in [tags] {
        drop {}
      }
    }
    
    output {
     stdout {
      codec=>rubydebug{}
       }
     }
    
    [elk@zjtest7-frontend config]$ ../bin/logstash -f stdin04.conf 
    Settings: Default pipeline workers: 1
    Pipeline main started
    SELECT SLEEP
    SELECT SLEEP1
    ddd
    {
           "message" => "ddd",
          "@version" => "1",
        "@timestamp" => "2016-09-15T04:36:14.172Z",
              "host" => "0.0.0.0",
              "tags" => [
            [0] "_grokparsefailure"
        ]
    }
    SELECT SLEEPtetwet
    ffsf
    {
           "message" => "ffsf",
          "@version" => "1",
        "@timestamp" => "2016-09-15T04:36:31.788Z",
              "host" => "0.0.0.0",
              "tags" => [
            [0] "_grokparsefailure"
        ]
    }
    
    /***********************
    [elk@zjtest7-frontend config]$ cat stdin04.conf 
    input {
        stdin {
        }
    }
    filter {
      # drop sleep events
      grok {
        match => { "message" => "SELECT SLEEP" }
        add_tag => [ "sleep_drop" ]
        tag_on_failure => [] # prevent default _grokparsefailure tag on real records
      }
      if "sleep_drop" in [tags] {
        drop {}
      }
    }
    
    output {
     stdout {
      codec=>rubydebug{}
       }
     }
    
    [elk@zjtest7-frontend config]$ ../bin/logstash -f stdin04.conf 
    Settings: Default pipeline workers: 1
    Pipeline main started
    SELECT SLEEP
    SELECT SLEEP4242
    ffs
    {
           "message" => "ffs",
          "@version" => "1",
        "@timestamp" => "2016-09-15T04:37:57.356Z",
              "host" => "0.0.0.0"
    }

  • 相关阅读:
    vue框架,后端框架选型
    appium,元素定位和元素操作,使用uiautomatorviewer
    appium,参数化,数据驱动
    Qt 应用程序无法正常启动0xc000007b
    NOI2021 游记
    NOI 2021 游记
    NOI2021 看台风记
    NOI2021 部分题目题解
    NOI2021游记
    vectorized case branch
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350260.html
Copyright © 2020-2023  润新知