diff --git a/docs/sources/clients/promtail/configuration.md b/docs/sources/clients/promtail/configuration.md index 77db37c970f62..a282f070dd31b 100644 --- a/docs/sources/clients/promtail/configuration.md +++ b/docs/sources/clients/promtail/configuration.md @@ -259,12 +259,12 @@ backoff_config: # Use map like {"foo": "bar"} to add a label foo with # value bar. # These can also be specified from command line: -# -client.external-labels=k1=v1,k2=v2 +# -client.external-labels=k1=v1,k2=v2 # (or --client.external-labels depending on your OS) -# labels supplied by the command line are applied +# labels supplied by the command line are applied # to all clients configured in the `clients` section. # NOTE: values defined in the config file will replace values -# defined on the command line for a given client if the +# defined on the command line for a given client if the # label keys are the same. external_labels: [ : ... ] @@ -299,10 +299,6 @@ of targets using a specified discovery method: # Name to identify this scrape config in the Promtail UI. job_name: -# Describes how to parse log lines. Supported values [cri docker raw] -# Deprecated in favor of pipeline_stages using the cri or docker stages. -[entry_parser: | default = "docker"] - # Describes how to transform logs from targets. [pipeline_stages: ] diff --git a/docs/sources/design-documents/labels.md b/docs/sources/design-documents/labels.md index f1854d5a4ccc1..052af82fa00e8 100644 --- a/docs/sources/design-documents/labels.md +++ b/docs/sources/design-documents/labels.md @@ -92,7 +92,7 @@ Our pipelined config might look like this: ```yaml scrape_configs: - job_name: system - entry_parsers: + pipeline_stages: - json: timestamp: source: time @@ -153,7 +153,7 @@ There is an alternative configuration that could be used here to accomplish the ```yaml scrape_configs: - job_name: system - entry_parsers: + pipeline_stages: - json: timestamp: source: time @@ -195,7 +195,7 @@ For example, the config above might be simplified to: ```yaml scrape_configs: - job_name: system - entry_parsers: + pipeline_stages: - docker: ``` @@ -204,7 +204,7 @@ or ```yaml scrape_configs: - job_name: system - entry_parsers: + pipeline_stages: - cri: ``` @@ -213,7 +213,7 @@ Which could still easily be extended to extract additional labels: ```yaml scrape_configs: - job_name: system - entry_parsers: + pipeline_stages: - docker: - regex: expr: '.*level=(?P[a-zA-Z]+).*' @@ -227,7 +227,7 @@ An even further simplification would be to attempt to autodetect the log format, ```yaml scrape_configs: - job_name: system - entry_parsers: + pipeline_stages: - auto: ``` diff --git a/pkg/promtail/api/entry_parser.go b/pkg/promtail/api/entry_parser.go deleted file mode 100644 index 58f33675da996..0000000000000 --- a/pkg/promtail/api/entry_parser.go +++ /dev/null @@ -1,104 +0,0 @@ -package api - -import ( - "fmt" - "regexp" - "strings" - "time" - - json "github.com/json-iterator/go" - "github.com/prometheus/common/model" -) - -// EntryParser describes how to parse log lines. -type EntryParser int - -// Different supported EntryParsers. -const ( - Docker EntryParser = iota - Raw - CRI -) - -var ( - criPattern = regexp.MustCompile(`^(?s)(?P