Improve docs to clarify common issues (#5054)

This commit is contained in:
Greg
2018-12-10 17:14:20 -07:00
committed by Daniel Nelson
parent 74d8523db6
commit 83bc3d1277
13 changed files with 34 additions and 94 deletions

View File

@@ -20,6 +20,7 @@ line and the `semantic_name` is used to name the field or tag. The extension
other special handling.
By default all named captures are converted into string fields.
If a pattern does not have a semantic name it will not be captured.
Timestamp modifiers can be used to convert captures to the timestamp of the
parsed metric. If no timestamp is parsed the metric will be created using the
current time.

View File

@@ -1,10 +1,10 @@
package grok
// DEFAULT_PATTERNS SHOULD BE KEPT IN-SYNC WITH patterns/influx-patterns
const DEFAULT_PATTERNS = `
# Captures are a slightly modified version of logstash "grok" patterns, with
# the format %{<capture syntax>[:<semantic name>][:<modifier>]}
# By default all named captures are converted into string fields.
# If a pattern does not have a semantic name it will not be captured.
# Modifiers can be used to convert captures to other types or tags.
# Timestamp modifiers can be used to convert captures to the timestamp of the
# parsed metric.

View File

@@ -43,7 +43,10 @@ ignored unless specified in the `tag_key` or `json_string_fields` options.
## Time format is the time layout that should be used to interprete the
## json_time_key. The time must be `unix`, `unix_ms` or a time in the
## "reference time".
## "reference time". To define a different format, arrange the values from
## the "reference time" in the example to match the format you will be
## using. For more information on the "reference time", visit
## https://golang.org/pkg/time/#Time.Format
## ex: json_time_format = "Mon Jan 2 15:04:05 -0700 MST 2006"
## json_time_format = "2006-01-02T15:04:05Z07:00"
## json_time_format = "unix"