I’m trying to parse an Apache log file, but “Test the rule” complains with “The matcher query doesn’t match the provided log sample”. Can someone tell why?
Process definition
PARSE(content, “IPADDR:‘net.peer.ip’
SPACE
IPADDR:‘net.proxy.ip’
’ - ’
LD:‘enduser.id’
’ [’ TIMESTAMP(‘dd/MMM/yyyy:HH:mm:ss Z’):timestamp ‘]’
SPACE
'\”’
LD:‘http.method’
SPACE
LD:‘http.target’
SPACE
LD:‘http.flavor’
‘\"’
SPACE
INT:‘http.status_code’
SPACE
LD:‘http.response_content_length’
SPACE
‘\“-\” \"’ LD:‘http.user_agent’
'; ’ LD:‘http.request.header.referrer’ ‘\"’
(SPACE LD)? (EOL | EOF)")
It turns out that I had to include other data in the sample section, ie, not only ‘content’. The easiest way is to create a new rule from the logs and events screen by clicking “Create processing rule”, which brings the necessary sample data automatically.