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

Promtail not following symlinks as expected #3374

Closed
fchiorascu opened this issue Feb 24, 2021 · 18 comments · Fixed by #6034
Closed

Promtail not following symlinks as expected #3374

fchiorascu opened this issue Feb 24, 2021 · 18 comments · Fixed by #6034

Comments

@fchiorascu
Copy link

fchiorascu commented Feb 24, 2021

Is your feature request related to a problem? Please describe.
Possibility to collect (tail) logs from stdout/stderr, port?

The current static_config uses path (log files) https://grafana.com/docs/loki/latest/clients/promtail/configuration/#static_configs that for symlinks is not working as expected.

Using: PLG Stack
Grafana: 7.4.0
Loki: 2.1.0
Promtail: 2.1.0

Describe the solution you'd like

  • Promtail being able to tail logs from: path file logs - symlinks, port, stdout, stderr of a pod/container in RHEL OpenSHift Container > 3.9 from a namespace.

Describe alternatives you've considered

  • At least being able to tail path file logs - symlinks.

Additional context

@bramevo
Copy link

bramevo commented Feb 26, 2021

+1 For this request. I need to be able parse compressed log files (gzip) and this would be possible using the above I assume.
Now I need a dedicated container just for decompressing the logfiles before using the promtail container to parse them.

@proffalken
Copy link

Isn't this what Fluentd/fluent-bit are for?

Promtail seems like a good starting place to slurp logs, but if you want to do processing on the data as it comes in then there are plenty of existing tools for that and we should be careful not to re-invent the wheel.

Admittedly neither of them are able to parse compressed files, but it feels we should add the features to something like that rather than adding it to promtail?

@fchiorascu
Copy link
Author

@proffalken thank you for your point of view.

I understand that is not a need of reinventing the wheel or covering the same aspects with multiple options/similar tools, this is clear and no doubt there. However I don't need promtail for log processing or to use in complex ecosystems, it was a good fit for us due to the fact that is lightweight and we could integrate in a small RHEL OpenShift Container Platform (namespace) to collect logs from 1 application (backend/frontend) but he is not behaving well with symlinks and doesn't have the maturity or alternatives to file log path such as stdout, stderr, port. Why to use fluentbit/fluentd instead of using entire PLG Stack, reducing the complexity and being sure that the pieces integrates seamlessly.

@proffalken
Copy link

@fchiorascu that's fair enough, objection removed ;)

@stale
Copy link

stale bot commented Jun 3, 2021

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.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jun 3, 2021
@proffalken
Copy link

Commenting to keep this open, I think it's a really useful addition to Loki/Promtail.

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Jun 6, 2021
@stale
Copy link

stale bot commented Jul 9, 2021

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.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jul 9, 2021
@proffalken
Copy link

No thanks @stalebot - let's keep this one open...

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Jul 10, 2021
@majuansari
Copy link

Please keep this one open. Much needed feature

@stale
Copy link

stale bot commented Aug 21, 2021

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.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Aug 21, 2021
@MurzNN
Copy link

MurzNN commented Aug 21, 2021

Very useful feature, reopen pls!

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Aug 21, 2021
@fchiorascu
Copy link
Author

Reopen please.

@slim-bean
Copy link
Collaborator

Trying to understand this issue and it feels like it covers multiple topics.

In regards to the symlinks not working, this sounds like a bug, we use symlinks all the time without issue, are you able to provide more context here?

In regards to logs from stdout and stderr, promtail supports the --stdin flag now which lets you pipe logs into promtail.

@slim-bean slim-bean changed the title Promtail to collect logs from port, stdout, stderr not only from path, when? Promtail not following symlinks as expected Sep 30, 2021
@stale
Copy link

stale bot commented Mar 3, 2022

Hi! This issue has been automatically marked as stale because it has not had any
activity in the past 30 days.

We use a stalebot among other tools to help manage the state of issues in this project.
A stalebot can be very useful in closing issues in a number of cases; the most common
is closing issues or PRs where the original reporter has not responded.

Stalebots are also emotionless and cruel and can close issues which are still very relevant.

If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry.

We regularly sort for closed issues which have a stale label sorted by thumbs up.

We may also:

  • Mark issues as revivable if we think it's a valid issue but isn't something we are likely
    to prioritize in the future (the issue will still remain closed).
  • Add a keepalive label to silence the stalebot if the issue is very common/popular/important.

We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task,
our sincere apologies if you find yourself at the mercy of the stalebot.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Mar 3, 2022
@MurzNN
Copy link

MurzNN commented Mar 6, 2022

/keepalive

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Mar 6, 2022
@stale
Copy link

stale bot commented Apr 16, 2022

Hi! This issue has been automatically marked as stale because it has not had any
activity in the past 30 days.

We use a stalebot among other tools to help manage the state of issues in this project.
A stalebot can be very useful in closing issues in a number of cases; the most common
is closing issues or PRs where the original reporter has not responded.

Stalebots are also emotionless and cruel and can close issues which are still very relevant.

If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry.

We regularly sort for closed issues which have a stale label sorted by thumbs up.

We may also:

  • Mark issues as revivable if we think it's a valid issue but isn't something we are likely
    to prioritize in the future (the issue will still remain closed).
  • Add a keepalive label to silence the stalebot if the issue is very common/popular/important.

We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task,
our sincere apologies if you find yourself at the mercy of the stalebot.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Apr 16, 2022
@MurzNN
Copy link

MurzNN commented Apr 16, 2022

Bump

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Apr 16, 2022
@DylanGuedes
Copy link
Contributor

Apparently, grafana/tail#12 solves this 👀

DylanGuedes added a commit to DylanGuedes/loki that referenced this issue Apr 26, 2022
- This revendoring brings the fix to relative symlinks, as described in
  grafana#3374.
slim-bean pushed a commit that referenced this issue Apr 27, 2022
* Revendor grafana/tail.

- This revendoring brings the fix to relative symlinks, as described in
  #3374.

* Prune package from `go mod tidy`.

* noop
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.

7 participants