-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(stage): add docker and cri (#1091)
Signed-off-by: Xiang Dai <764524258@qq.com>
- Loading branch information
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# `cri` stage | ||
|
||
The `cri` stage is a parsing stage that reads the log line using the standard CRI logging format. | ||
|
||
## Schema | ||
|
||
```yaml | ||
cri: {} | ||
``` | ||
Unlike most stages, the `cri` stage provides no configuration options and only | ||
supports the specific CRI log format. CRI specifies log lines log lines as | ||
space-delimited values with the following components: | ||
|
||
1. `time`: The timestamp string of the log | ||
2. `stream`: Either stdout or stderr | ||
3. `log`: The contents of the log line | ||
|
||
No whitespace is permitted between the components. In the following exmaple, | ||
only the first log line can be properly formatted using the `cri` stage: | ||
|
||
``` | ||
"2019-01-01T01:00:00.000000001Z stderr P test\ngood" | ||
"2019-01-01 T01:00:00.000000001Z stderr testgood" | ||
"2019-01-01T01:00:00.000000001Z testgood" | ||
``` | ||
|
||
## Examples | ||
|
||
For the given pipeline: | ||
|
||
```yaml | ||
- cri: {} | ||
``` | ||
|
||
Given the following log line: | ||
|
||
``` | ||
"2019-04-30T02:12:41.8443515Z stdout xx message" | ||
``` | ||
|
||
The following key-value pairs would be created in the set of extracted data: | ||
|
||
- `output`: `message` | ||
- `stream`: `stdout` | ||
- `timestamp`: `2019-04-30T02:12:41.8443515` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# `docker` stage | ||
|
||
The `docker` stage is a parsing stage that reads log lines in the standard | ||
format of Docker log files. | ||
|
||
## Schema | ||
|
||
```yaml | ||
docker: {} | ||
``` | ||
Unlike most stages, the `docker` stage provides no configuration options and | ||
only supports the specific Docker log format. Each log line from Docker is | ||
written as JSON with the following keys: | ||
|
||
1. `log`: The content of log line | ||
2. `stream`: Either `stdout` or `stderr` | ||
3. `time`: The timestamp string of the log line | ||
|
||
## Examples | ||
|
||
For the given pipeline: | ||
|
||
```yaml | ||
- docker: {} | ||
``` | ||
|
||
Given the following log line: | ||
|
||
``` | ||
{"log":"log message\n","stream":"stderr","time":"2019-04-30T02:12:41.8443515Z"} | ||
``` | ||
|
||
The following key-value pairs would be created in the set of extracted data: | ||
|
||
- `output`: `log message\n` | ||
- `stream`: `stderr` | ||
- `timestamp`: `2019-04-30T02:12:41.8443515` |