I am trying to parse NASA IIS logs. I get the error below:
[2017-11-16T16:48:48,905][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[2017-11-16T16:48:48,912][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[2017-11-16T16:48:49,189][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Expected one of #, => at line 55, column 17 (byte 1278) after filter {\n\tif [type] == \"iis\"{\n\n\t\tgrok {\n\t\t\tmatch => { \"message\" => \"^%{DATA:Host}\\s%{DATA:FIELD1}\\s%{DATA:FIELD2}\\s\\[%{DATA:TimeStamp}*\\]\\s\\\"%{WORD:Method}\\s%{DATA:Query}\\s%{DATA:HTTPVersion}\\\"\\s%{BASE10NUM:HTTPReply}\\s%{NUMBER:Bytes}?$\"\n\t\t}\n\t}\n}\n\noutput {\n elasticsearch "}
Here is my grok filter:
filter {
if [type] == "iis"{
grok {
match => { "message" => "^%{DATA:Host}\s%{DATA:FIELD1}\s%{DATA:FIELD2}\s\[%{DATA:TimeStamp}*\]\s\"%{WORD:Method}\s%{DATA:Query}\s%{DATA:HTTPVersion}\"\s%{BASE10NUM:HTTPReply}\s%{NUMBER:Bytes}?$"
}
}
}
My issue just seems to be incorrect syntax, however I am quite new to logstash so can't see where I am going wrong.
Thanks in advance
G