-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/loki: support multiple instances of promtail (BREAKING CHANGE) (#353
) * pkg/loki: support multiple instances of promtail * fix build, lint errors * docs, fix configs * hard break * changelog * create positions directory if it doesn't exist * fix bugs from testing * remove test extra loki config * update remaining docs to use new loki config * add more detail to the migration guide, config reference * fix loki port
- Loading branch information
Showing
15 changed files
with
695 additions
and
338 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
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
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,58 @@ | ||
# Migration Guide | ||
|
||
This is a guide detailing all breaking changes that have happened in prior | ||
releases and how to migrate to newer versions. | ||
|
||
# v0.12.0 | ||
|
||
## Loki Promtail Config Change | ||
|
||
The Loki Promtail config (`loki` in the config file) has been changed to store | ||
configs within a `configs` list. This allows for defining multiple Loki | ||
Promtail instances for collecting logs and forwarding them to different Loki | ||
servers. | ||
|
||
To migrate, add a `configs:` array and move your existing config inside of it. | ||
Give the element a `name: default` field. | ||
|
||
Each config must have a unique non-empty name. `default` is recommended for users | ||
that don't have other configs. The name of the config will be added as a | ||
`loki_config` label for Loki Promtail metrics. | ||
|
||
Example old config: | ||
|
||
```yaml | ||
loki: | ||
positions: | ||
filename: /tmp/positions.yaml | ||
clients: | ||
- url: http://loki:3100/loki/api/v1/push | ||
scrape_configs: | ||
- job_name: system | ||
static_configs: | ||
- targets: | ||
- localhost | ||
labels: | ||
job: varlogs | ||
__path__: /var/log/*log | ||
``` | ||
Example migrated config: | ||
```yaml | ||
loki: | ||
configs: | ||
- name: default | ||
positions: | ||
filename: /tmp/positions.yaml | ||
clients: | ||
- url: http://loki:3100/loki/api/v1/push | ||
scrape_configs: | ||
- job_name: system | ||
static_configs: | ||
- targets: | ||
- localhost | ||
labels: | ||
job: varlogs | ||
__path__: /var/log/*log | ||
``` |
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
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
Oops, something went wrong.