Actually this filter isn't working for me.
my problem is even wider.
The logs entry looks like that:
TransactionID: d82fd7c5-41b3-4506-a9f4-5e75f7ed8c60 <FRAMEWORK> <CLIENT_LOG_MSG> ********************************************************************************************************************************* MAC id:ec:9b:f3:d4:a4:1d :: Location:WODTrial :: Geo Code:fc:91:14:8a:3c:63 :: Device model:Samsung Galaxy S6 Edge :: Device Nickname:null :: User Id:TAYLORDUKE2616 :: User-Agent:Mozilla/5.0 (Linux; Android 7.0; SM-G925T Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/59.0.3071.125 Mobile Safari/537.36 :: Refferer(URI):https://wifiondemand.xfinity.com/wod/ :: Client IP:73.58.158.246, 10.10.10.164, 10.108.2.44 :: Timestamp:2017-07-24 09:43:00.178 ********************************************************************************************************************************* { "timestamp" : 1500907380064, "severity" : "Error", "userAgent" : "Mozilla/5.0 (Linux; Android 7.0; SM-G925T Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/59.0.3071.125 Mobile Safari/537.36", "route" : "confirmorder", "raw" : { "response" : "{\"errorCode\":\"000302\",\"errorMessage\":\"We're sorry, we are currently experiencing some difficulty processing your payment. Please verify your credit card details.\",\"transactionId\":\"835686ea-b71f 4d04-a339-a91588f8d2e1\"}" }, "template" : "confirm.tmpl" }
I created a grok for that and used it in the grok debugger:
TransactionID: %{DATA:transactionid} \<%{DATA}\> \<%{DATA}\> \*+ MAC id:%{MAC:macid} :: Location:%{LOCALSTRING:location} :: Geo Code:%{MAC:geozone} :: Device model:%{DATA:devicemodel} :: Device Nickname:%{DATA:devicename} :: User Id:%{DATA:userid} :: User-Agent:%{DATA:useragent} :: Refferer\(URI\):%{DATA:reffereruri} :: Client IP:%{DATA:clientip} :: Timestamp:%{TIMESTAMP_ISO8601:timestamp} \*+ \{ "timestamp" : %{BASE10NUM:jepochtimestamp}, "severity" : \"%{LOGLEVEL:jseverity}\", "userAgent" : \"%{GREEDYDATA:juseragent}\", "route" : \"%{DATA:jroute}\", "raw" : \{ %{GREEDYDATA:raw} \}, "template" : \"%{DATA:template}\" \}
Its is working fine and I can see in the below , all the mapping.
The problem is that when I set this grok in the Logstash it is failing to start.
I am getting the following in the Logstash log:
############### START APPLICATION : OMNI APPSERVER CLIENT #############\n if [type] == \"omniappservclient\" {\n mutate {\n uppercase => [ \"severity\" ]\n }\n grok {\n tag_on_failure => [ \"_grokparsefailure\" , \"_urldecodefailure\" , \"_jsonparsefailure\" ]\n break_on_match => true\n keep_empty_captures => false\n match => {\n message => [\n \"TransactionID: %{DATA:transactionid} \\<%{DATA}\\> \\<%{DATA}\\> \\*+ MAC id:%{MAC:macid} :: Location:%{LOCALSTRING:location} :: Geo Code:%{MAC:geozone} :: Device model:%{DATA:devicemodel} :: Device Nickname:%{DATA:devicename} :: User Id:%{DATA:userid} :: User-Agent:%{DATA:useragent} :: Refferer\\(URI\\):%{DATA:reffereruri} :: Client IP:%{DATA:clientip} :: Timestamp:%{TIMESTAMP_ISO8601:timestamp} \\*+ \\{ \"", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:50:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:145:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:286:in `create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:in `register_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:274:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:185:in `run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}
When I remove the last part in the grok, and left it like that:
message => [
"TransactionID: %{DATA:transactionid} \<%{DATA}\> \<%{DATA}\> \*+ MAC id:%{MAC:macid} :: Location:%{LOCALSTRING:location} :: Geo Code:%{MAC:geozone} :: Device model:%{DATA:devicemodel} :: Device Nickname:%{DATA:devicename} :: User Id:%{DATA:userid} :: User-Agent:%{DATA:useragent} :: Refferer\(URI\):%{DATA:reffereruri} :: Client IP:%{DATA:clientip} :: Timestamp:%{TIMESTAMP_ISO8601:timestamp} \*+ "
Logstash is starting and running.
Also the following using of the filters:
# urldecode {
# field => { "macid" , "geozone" }
# all_fields => true
# }
# json {
# source => "[raw] [responce]"
# }
It is not working. I am getting failures.
Need urgent help on that, as I already spent more that a day to try and solve it.
Any idea?
Thanks
Sharon.