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

FileTarget stuck if no log is found on startup #4460

Closed
rsteneteg opened this issue Oct 12, 2021 · 1 comment · Fixed by #4461
Closed

FileTarget stuck if no log is found on startup #4460

rsteneteg opened this issue Oct 12, 2021 · 1 comment · Fixed by #4461

Comments

@rsteneteg
Copy link
Contributor

Describe the bug
A fix that was made to prevent Promtail to stop reading logs from recreated statefulset pods (#3586), it had an unexpected side effect that if a FileTarget don't find any logs at startup it will be stuck and not detect them if they later get created.

To Reproduce
Steps to reproduce the behavior:

  1. Start Promtail with a file target to a path that don't have any matching logs.
  2. After Promtail as started, create a log file in the watched filetarget path

Expected behavior
Once a matching logfile is created Promtail should automatically detect it and start tailing it.

Screenshots, Promtail config, or terminal output
Scrape job

        static_configs:
          - targets:
              - localhost
            labels:
              __path__: "/foobar/*.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants