Text logs with fastmatch
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326parser:
fastmatch:
# Define an array of patterns to match against.
# In this example we only use one pattern because the log format is the same for all lines.
# If we wanted to include the Apache Extended Log format, we could provide an additional pattern.
match:
- '%{remote_ip} %{identity} %{user} [%{timestamp}] "%{method} %{request_uri} %{protocol}" %{status} %{bytes_sent}'
emptyValues: [ '-' ] # specify that `-` string values are considered null
fields:
- name: remote_ip
type: string
indicators:
- ip
- name: identity
type: string
- name: user
type: string
- name: timestamp
type: timestamp
isEventTime: true
timeFormats:
- '%d/%b/%Y:%H:%M:%S %z'
- name: method
type: string
- name: request_uri
type: string
- name: protocol
type: string
- name: status
type: int
- name: bytes_sent
type: bigintUnderstanding fastmatch patterns
Delimiters
Anonymous fields
Tail capture
Handling quotes
Last updated
Was this helpful?

