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 goes nuts when logfile is a symbolic link #1240
Comments
Is the file pointed to by the link readable by the user running the Promtail process? Will have to look at why this is logging so aggressively, that shouldn't be happening |
yes, like i wrote, the file is readably and exists. A "normal" tail from the terminal works as expected. |
Can you share the output of |
everything runs as user test. |
My initial thought here is it may be the relative path used in the symlink, can you make the link with an absolute path and see if that works? |
yes, that works. Using an absolute path in the symlink works. |
Ok, I am away from my computer but will take a look to see why the relative path doesn't work and if it's possible to support that |
great, thanks |
As well as we definitely should not be logging at that frequency |
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. |
Add some more logging to the index cache,
Changing the symlinks does not solve the issue. Sometimes, for examlple with TKGI (formerly PKS) you do not have the possibility to change the symlinks. This issue currently prevents my company from evaluating Loki. |
I think promtail should be fixed and allow symlink with relative paths. I agree with @mwmahlberg |
I'm having this same problem on an ubuntu system, specifically with subiquity. This app seems to do things to symlinks that it moves around, currently:
I think the app is doing some kind of wacky log rotation where subiquity-info.log and subiquity-debug.log are symlinks to the latest file; when it rotates I think it will make *.2101 and update the symlink accordingly. I don't really have a workaround at the moment, and I can't really think of a generic one anyway. I'm specifying a static config of /var/log/**/*.log which is why it picks up this symlink. In this case it wouldn't see the .2100 files so if promtail followed the symlinks it would have worked fine. An option "don't ever follow symlinks" might be okay, but following them would be better. Either way, it's filling my syslog up with these warnings which is annoying. |
I'm having this same problem on centos7 system. |
I'm also seeing this problem on ubuntu. |
Describe the bug
Using promtail with a static_configs hangs when hitting symbolic links.
To Reproduce
It ends up with tousands of messages like this per second:
/opt/omd/sites/test/var/log/naemon.log is a symbolic link to ../naemon/naemon.log in this case and does exist and is readable.
Finally promtail has to be killed with -9.
Expected behavior
I would expect promtail to follow the symbolic link and use that file.
Environment:
Screenshots, Promtail config, or terminal output
The text was updated successfully, but these errors were encountered: