allow promtail path to be a glob match (#206)
* allow promtail target path to be a glob match Promtail now expects __path__ to be a glob. All files that match the glob expression will be tailed. If new files are created that match the glob, they will immediately be tailed. * remove entry from positions file when file is deleted * fix syncing the current positions to positions file * handle file renames When a file is renamed a "rename" and a "create" event are sent. We need to treat the rename as a remove. If the new filename matches the path glob, then we will start tailing it when the "create" event is reveived. * lint
Showing
- cmd/promtail/promtail-docker-config.yaml 1 addition, 1 deletioncmd/promtail/promtail-docker-config.yaml
- cmd/promtail/promtail-local-config.yaml 1 addition, 1 deletioncmd/promtail/promtail-local-config.yaml
- pkg/promtail/position.go 7 additions, 0 deletionspkg/promtail/position.go
- pkg/promtail/target.go 57 additions, 17 deletionspkg/promtail/target.go
- production/helm/templates/promtail/configmap.yaml 2 additions, 2 deletionsproduction/helm/templates/promtail/configmap.yaml
- production/ksonnet/promtail/promtail.libsonnet 3 additions, 3 deletionsproduction/ksonnet/promtail/promtail.libsonnet
Loading
Please register or sign in to comment