zoukankan      html  css  js  c++  java
  • 字符串转换为float

    Configuration OK
    zjtest7-frontend:/usr/local/logstash-2.3.4/config# ../bin/logstash -f g01.conf 
    Settings: Default pipeline workers: 1
    Pipeline main started
    begin 123.456 end
    {
             "message" => "begin 123.456 end",
            "@version" => "1",
          "@timestamp" => "2016-09-11T05:58:43.973Z",
                "host" => "0.0.0.0",
        "request_time" => 123.456,
                "test" => "aaaaaavvv"
    }
    ^CSIGINT received. Shutting down the agent. {:level=>:warn}
    stopping pipeline {:id=>"main"}
    ^CSIGINT received. Terminating immediately.. {:level=>:fatal}
    zjtest7-frontend:/usr/local/logstash-2.3.4/config# ^C
    zjtest7-frontend:/usr/local/logstash-2.3.4/config# cat g01.conf 
    input {stdin{}}
     filter {
        grok {
         match => {
         "message" =>"s+(?<request_time>d+(?:.d+)?)s+"}
         add_field =>["[test]","aaaaaavvv"]
         }
           mutate {  
                            convert => [ "request_time", "float"]  
                   }  
     }
    output {
          stdout {
                   codec => rubydebug{}
                    } 
    }
    

  • 相关阅读:
    dom4j 创建XML文件
    Convert.ToInt32()与int.Parse()的区别
    委托
    工厂模式
    策略模式
    大型网站架构演化
    字符串反转(面试)
    switch(面试)
    带宽计算
    新语法
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350279.html
Copyright © 2011-2022 走看看