zoukankan      html  css  js  c++  java
  • logstash nginx 报ArgumentError: comparison of String with 5 failed

     80.82.78.38 [23/Sep/2016:05:36:18 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" - 404 162 "-" "Mozilla" 0.000 -
     
     需要补一刀;
     %{IPORHOST:clientip} [%{HTTPDATE:time}] "%{WORD:verb} (?<http_url>S+)s+HTTP/%{NUMBER:httpversion}"s+-s+%{NUMBER:http_status_code}s+%{NUMBER:bytes}s+"-"s+"(?<http_user_agent>(S+))"s+(%{BASE16FLOAT:request_time})s+(%{IPORHOST:http_x_forwarded_for}|-)
     
     
     
     
     echo '80.82.78.38 [23/Sep/2016:05:36:18 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" - 404 162 "-" "Mozilla" 0.000 -' >>access.log 
    ArgumentError: comparison of String with 5 failed
                 >= at org/jruby/RubyComparable.java:155
                 >= at org/jruby/RubyString.java:1853
        output_func at (eval):145
       output_batch at /usr/local/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:293
               each at org/jruby/RubyArray.java:1613
             inject at org/jruby/RubyEnumerable.java:852
       output_batch at /usr/local/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:287
        worker_loop at /usr/local/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:232
      start_workers at /usr/local/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:201
      
      
      jrhwpt02:/var/log/nginx# echo '80.82.78.38 [23/Sep/2016:05:36:18 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" - 404 162 "-" "Mozilla" 0.000 -' >>access.log 
    You have new mail in /var/spool/mail/root
      
      {
                "@version" => "1",
              "@timestamp" => "2016-09-22T21:36:18.000Z",
                    "path" => "/data01/applog_backup/zjzc_log/zj-frontend02-access.2016-09-23",
                    "host" => "dr-mysql01.zjcap.com",
                    "type" => "zj_frontend_access",
                "clientip" => "80.82.78.38",
                    "time" => "23/Sep/2016:05:36:18 +0800",
                    "verb" => "GET",
                "http_url" => "http://www.baidu.com/cache/global/img/gs.gif",
             "httpversion" => "1.1",
        "http_status_code" => "404",
                   "bytes" => "162",
         "http_user_agent" => "Mozilla",
           "response_time" => 0.0,
                "messager" => "zj_frontend_access 80.82.78.38 [23/Sep/2016:05:36:18 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" - 404 162 "-" "Mozilla" 0.000 -"
    }
    ok

  • 相关阅读:
    WPF开发进阶
    WPF开发进阶
    java 架构好文章
    Logback 输出 JPA SQL日志 到文件
    Linux Bash Shell j简单入门
    java内存空间简述
    PowerDesigner 16.5 反向PostgreSQL9.01 中 Unable to list the columns. SQLSTATE = 22003不良的类型值 short : t 解决方法
    Java代码自动部署
    Oracle优化技巧
    string类型与ASCII byte[]转换
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350226.html
Copyright © 2011-2022 走看看