When I use promtail to push logs, some logs cannot be pushed successfully. They cannot be queried in my grafanna, but it does generate logs all the time. Is it because of the large amount of logs? The promtail log is as follows:
level=error ts=2022-09-05T09:24:38.641961828Z caller=tailer.go:94 component=tailer msg="error getting tail position and/or size" path=/data/20201207/T.log error=" invalid argument"
I think I know the reason, because the log I want to push has a soft link, and I want to know why using a soft link is causing it to fail
Welcome to the community support forums !!
Normally the best way to identify any issues in the Promtail, is to run the executable binary file from the command line e.g. imagining if the files are inside
I hope this helps.
Thanks a lot!! Yes, I did, e.g. nohup ./promtail-linux-amd64 -config.file=./promtail.yaml > ./promtail.log 2>&1 &, but always push logs unsuccessfully , I’m not sure if it’s because of the soft link, but after using the source file this error went away. I hope to solve this problem,
well, I think it’s mostly about permissions. So for e.g., I noticed that in Ubuntu you may not get such issues frequently but as I tested some weeks ago, I run into problems as well and either create the defined directories in the Promtail config file OR best run it as a root user.
At first I also thought it was a permissions issue, but I found out that my destination file permissions are 777 and the source file is 644.