Skip to content

Commit

Permalink
set __path__ correctly in promtail config (#245)
Browse files Browse the repository at this point in the history
__path__ is now expected to be a `glob` match, not a directory.  In k8s the "glob" expression needed is just the exact file path of the container log, which is `/var/log/pods/<podUID>/<container_name>/0.log`
  • Loading branch information
woodsaj authored and tomwilkie committed Jan 29, 2019
1 parent 07f20b0 commit 5c00678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/promtail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ data:
target_label: container_name
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- replacement: /var/log/pods/$1
- replacement: /var/log/pods/$1/0.log
separator: /
source_labels:
- __meta_kubernetes_pod_uid
Expand Down Expand Up @@ -86,7 +86,7 @@ data:
target_label: container_name
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- replacement: /var/log/pods/$1
- replacement: /var/log/pods/$1/0.log
separator: /
source_labels:
- __meta_kubernetes_pod_uid
Expand Down

0 comments on commit 5c00678

Please sign in to comment.