Last active
December 30, 2015 07:19
-
-
Save Tombar/7795525 to your computer and use it in GitHub Desktop.
Logstash filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"host": "examople.com", "remote_addr": "A.B.C.D", "remote_user": "-", "time_local":"04/Dec/2013:21:05:47 +0000", "request": "GET XXXXXX HTTP/1.1", "status":200, "body_bytes_sent": 47322, "http_referer": "http://logstash.net", "http_user_agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko", "upstream": {"cache_status":"-", "status": [200], "response_time":[0.302], "addr":"A.B.C.D:80" }, "postdata": {"request_body": "-", "request_length":2963, "request_completion":"OK" },"cookie": {"userid": "-41813428", "param2": "YZY" } } | |
35 if [cookie.userid] >= 0 { | |
36 mutate { add_field => ['btng_user_logged', 1] } | |
37 } else { | |
38 mutate { add_field => ['btng_user_logged', 0] } | |
39 } | |
Exception in filterworker {"exception"=>#<NoMethodError: undefined method `>=' for nil:NilClass>, "backtrace"=>["(eval):113:in `initialize'", "org/jruby/RubyProc.java:271:in `call'", "file:/opt/logstash/server/lib/logstash-1.2.2.jar!/logstash/pipeline.rb:250:in `filter'", "file:/opt/logstash/server/lib/logstash-1.2.2.jar!/logstash/pipeline.rb:191:in `filterworker'", "file:/opt/logstash/server/lib/logstash-1.2.2.jar!/logstash/pipeline.rb:134:in `start_filters'"], :level=>:error, :file=>"/opt/logstash/server/lib/logstash-1.2.2.jar!/logstash/pipeline.rb", :line=>"200"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment