Last active
May 28, 2023 19:45
-
-
Save xakrume/9abcd6d4768e578f91418caa0a11ab8f to your computer and use it in GitHub Desktop.
ansible-promtail.yaml
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
pipeline_stages: | |
- logfmt: | |
mapping: | |
timestamp: time | |
level: | |
- match: | |
... | |
- match: | |
selector: '{job="exporters"}' | |
stages: | |
- regex: | |
source: service | |
expression: .+-(?P<environment>(stable|testing|unstable)$) | |
- labels: | |
environment: | |
- template: | |
source: environment | |
template: '{{ if .Value }}{{ .Value }}{{ else }}default{{ end }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment