output
stage
The output
stage is an action stage that takes data from the extracted map andchanges the log line that will be sent to Loki.
Schema
output:
# Name from extracted data to use for the log entry.
source: <string>
Example
For the given pipeline:
- json:
expressions:
user: log
message: stream
- labels:
user:
- output:
source: content
And the given log line:
{"user": "alexis", "message": "hello, world!"}
Then the first stage will extract the following key-value pairs into theextracted map:
user
:alexis
message
:hello, world!
The second stage will then add user=alexis
to the label set for the outgoinglog line, and the final output
stage will change the log line from theoriginal JSON to hello, world!