zoukankan      html  css  js  c++  java
  • logstash 字段类型转换后 需要刷新

    filter {
        grok {
            match => [
                 "message" , "s*%{IPORHOST:clientip}s+-s+-s+[%{HTTPDATE:time}]s+"%{WORD:verb}s+(?<api>(S+))?.*s+HTTP/%{NUMBER:httpversion}"s+%{NUMBER:http_status_code}s+%{NUMBER:bytes}s+(%{BASE16FLOAT:request_time})s+%{IPORHOST:remoteip}",
                  "message" ,"s*%{IPORHOST:clientip}s+-s+-s+[%{HTTPDATE:time}]s+"%{WORD:verb}s+(?<api>(S+))s+HTTP/%{NUMBER:httpversion}"s+%{NUMBER:http_status_code}s+%{NUMBER:bytes}s+(%{BASE16FLOAT:request_time})s+%{IPORHOST:remoteip}",
                 "message" ,"s*%{IPORHOST:clientip}s+-s+-s+[%{HTTPDATE:time}]s+"%{WORD:verb}s+(?<api>(S+))s+HTTP/%{NUMBER:httpversion}"s+%{NUMBER:http_status_code}s+-s+(%{BASE16FLOAT:request_time})s+%{IPORHOST:remoteip}"
            ]
        }   
            mutate {
                            convert => [ "request_time", "float"]
                           add_field =>["response_time","%{request_time}"]
                            remove_field =>["request_time"]
                            
                    }
       date {
            match => ["time", "dd/MMM/yyyy:HH:mm:ss Z"]
        }
         
    }
    

  • 相关阅读:
    JavaScript常用正則表達式
    详尽解析window.event对象
    DWR的类却无法在js里用
    javascript控制小数点精度
    49. Group Anagrams
    48. Rotate Image
    64. Minimum Path Sum
    63. Unique Paths II
    62. Unique Paths
    53. Maximum Subarray
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199216.html
Copyright © 2011-2022 走看看