So this bit \"%{DATA:path}\" \"(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})\" %{NUMBER:response:int} %{NUMBER:bytes:int} %{NUMBER:response_ms:int} %{QS:referrer} %{QS:agent}
Doesn’t seem to fit this bit'/' 'GET / HTTP/1.1' 200 21003 217 'https://w2.website.co.uk/Planner/Planner' 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36'
even though this is direct from the example.
I dont quite grok these grok filters, could anyone point me in the right direction?
# sudo service logstash configtest
Error: Expected one of #, ", ', -, [, { at line 30, column 33 (byte 339) after filter {
if [type] == "f5-access" {
grok {
match => { "message" =>
The sample log line contains single quotes but your grok expression contains double quotes.
The grok expression needs to be a quoted string: match => { "message" => "grok expression here" }.
You really should avoid having more than one DATA pattern in the same expression. Depending on the rest of the expression and the input data you could get very weird matches. In this case I suggest you use NOTSPACE instead.
Hi, i still seem to be having real problems with this, is there somewhere logstash caches its filters and im not seeing an update after a service restart?
i changed my pattern in the F5 to remove " from the output and replaced with ' and changed the DATA tags to NOTSPACE tags so my output is now:
the grok seems to work perfectly when I run in constructor, it now starts fine in logstash but i'm still getting _grokparseerrors on my output rather than the desired fields.
Hi, i still seem to be having real problems with this, is there somewhere logstash caches its filters and im not seeing an update after a service restart?
No, but make sure you don't have any unexpected files in /etc/logstash/conf.d. If you start Logstash by pointing it to that directory (or some other directory) Logstash will read all files in there.
the grok seems to work perfectly when I run in constructor, it now starts fine in logstash but i'm still getting _grokparseerrors on my output rather than the desired fields.
Be systematic. Start with the absolutely simplest expression, %{IP:clientip}. If that works, tack on another token. Continue until is stops working.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.