Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
decolorize
Caution
Promtail has been deprecated and is in Long-Term Support (LTS) through February 28, 2026. Promtail will reach an End-of-Life (EOL) on March 2, 2026. You can find migration resources here.
The decolorize stage is a transform stage that lets you strip
ANSI color codes from the log line, thus making it easier to
parse logs further.
There are examples below to help explain.
Decolorize stage schema
decolorize:
# Currently this stage has no configurable optionsExamples
The following is an example showing the use of the decolorize stage.
Given the pipeline:
- decolorize:Would turn each line having a color code into a non-colored one, e.g.
[2022-11-04 22:17:57.811] \033[0;32http\033[0m: GET /_health (0 ms) 204is turned into
[2022-11-04 22:17:57.811] http: GET /_health (0 ms) 204


