Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promtail: adding pipeline stage inspector #4011

Merged
merged 10 commits into from
Jul 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/sources/clients/promtail/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To start Promtail in dry run mode use the flag `--dry-run` as shown in the examp
cat my.log | promtail --stdin --dry-run --client.url http://127.0.0.1:3100/loki/api/v1/push
```

## Inspecting
## Inspecting pipeline stages

Promtail can output all changes to log entries as each pipeline stage is executed.
Each log entry contains four fields:
Expand All @@ -28,21 +28,21 @@ Each log entry contains four fields:
- labels
- extracted fields

Whenever any of these change, a log message will be printed:
Enable the inspection output using the `--inspect` command-line option.<br>
The `--inspect` option can be used in combination with `--stdin` and `--dry-run`.
dannykopping marked this conversation as resolved.
Show resolved Hide resolved

```bash
cat my.log | promtail --stdin --dry-run --inspect --client.url http://127.0.0.1:3100/loki/api/v1/push
```

![screenshot](../inspect.png)

It can be used in combination with `--stdin` and `--dry-run`.

Additions will be highlighted in green, modifications in yellow, and removals in red.
The output uses color to highlight changes. Additions are in green, modifications in yellow, and removals in red.

If no changes are applied during a stage, that is usually an indication of a misconfiguration or undesired behavior.

**Note**: the `--inspect` flag should _not_ be used in production.
The `--inspect` flag should not be used in production, as the calculation of changes between pipeline stages impacts
Promtail's performance.
dannykopping marked this conversation as resolved.
Show resolved Hide resolved

## Pipe data to Promtail

Expand Down