-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
promtail: exclude files from static_configs __path__ #3804
Comments
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Should this be implemented as described? Can this issue be re open? |
Please reopen this feature request to allow excluding specific paths. |
I would also like this to be re-opened for consideration. In my case, Promtail is reading all files from |
I would also like this option, Please can it be reopened |
+1 for re-opening this |
I would add that I'm using promtail on a synology NAS and it has a folder named synolog
And I found that I my want *.log or _log from that directory, cause _log are the result of the smart tests of my HDD |
Is your feature request related to a problem? Please describe.
my
/var/log
directory has files with different structures, which requires me to use differentpipeline_stages
for each set of different files.Describe the solution you'd like
something like this would exclude all files that match the pattern
/host/var/log/contained.*.log
:or maybe call it
__exclude_path__
?or even modify
__path__
to be an array where the array items that start with!
exclude paths?if you agree, I can prepare a PR to modify the code (and docs) at:
loki/clients/pkg/promtail/targets/file/filetarget.go
Lines 162 to 171 in a9d85de
to do a second call to
doublestar.Match
before callingt.startTailing
.The text was updated successfully, but these errors were encountered: