|
1 | 1 | package grok |
2 | 2 |
|
3 | 3 | const DEFAULT_PATTERNS = ` |
4 | | -# Captures are a slightly modified version of logstash "grok" patterns, with |
5 | | -# the format %{<capture syntax>[:<semantic name>][:<modifier>]} |
6 | | -# By default all named captures are converted into string fields. |
7 | | -# If a pattern does not have a semantic name it will not be captured. |
8 | | -# Modifiers can be used to convert captures to other types or tags. |
9 | | -# Timestamp modifiers can be used to convert captures to the timestamp of the |
10 | | -# parsed metric. |
11 | | -
|
12 | | -# View logstash grok pattern docs here: |
13 | | -# https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html |
14 | | -# All default logstash patterns are supported, these can be viewed here: |
15 | | -# https://github.com/logstash-plugins/logstash-patterns-core/blob/master/patterns/grok-patterns |
16 | | -
|
17 | | -# Available modifiers: |
18 | | -# string (default if nothing is specified) |
19 | | -# int |
20 | | -# float |
21 | | -# duration (ie, 5.23ms gets converted to int nanoseconds) |
22 | | -# tag (converts the field into a tag) |
23 | | -# drop (drops the field completely) |
24 | | -# Timestamp modifiers: |
25 | | -# ts-ansic ("Mon Jan _2 15:04:05 2006") |
26 | | -# ts-unix ("Mon Jan _2 15:04:05 MST 2006") |
27 | | -# ts-ruby ("Mon Jan 02 15:04:05 -0700 2006") |
28 | | -# ts-rfc822 ("02 Jan 06 15:04 MST") |
29 | | -# ts-rfc822z ("02 Jan 06 15:04 -0700") |
30 | | -# ts-rfc850 ("Monday, 02-Jan-06 15:04:05 MST") |
31 | | -# ts-rfc1123 ("Mon, 02 Jan 2006 15:04:05 MST") |
32 | | -# ts-rfc1123z ("Mon, 02 Jan 2006 15:04:05 -0700") |
33 | | -# ts-rfc3339 ("2006-01-02T15:04:05Z07:00") |
34 | | -# ts-rfc3339nano ("2006-01-02T15:04:05.999999999Z07:00") |
35 | | -# ts-httpd ("02/Jan/2006:15:04:05 -0700") |
36 | | -# ts-epoch (seconds since unix epoch) |
37 | | -# ts-epochnano (nanoseconds since unix epoch) |
38 | | -# ts-"CUSTOM" |
39 | | -# CUSTOM time layouts must be within quotes and be the representation of the |
40 | | -# "reference time", which is Mon Jan 2 15:04:05 -0700 MST 2006 |
41 | | -# See https://golang.org/pkg/time/#Parse for more details. |
42 | | -
|
43 | 4 | # Example log file pattern, example log looks like this: |
44 | 5 | # [04/Jun/2016:12:41:45 +0100] 1.25 200 192.168.1.1 5.432µs |
45 | 6 | # Breakdown of the DURATION pattern below: |
|
0 commit comments