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

Centralised logging collection #10220

Open
Oloremo opened this issue Mar 24, 2021 · 5 comments
Open

Centralised logging collection #10220

Oloremo opened this issue Mar 24, 2021 · 5 comments

Comments

@Oloremo
Copy link
Contributor

Oloremo commented Mar 24, 2021

Hi,

Currently, Nomad doesn't provide any way to do a centralized login by itself and relies on an external log collector or allocation drivers like docker logging.

I understand that reasoning but all current solutions are flawed in some way or another.

  • Docker engine is kinda deprecated and will be less and less present in the following years.
  • Side-car log collectors add complexity to job definitions and consume a lot of resources on the scale
  • Not all application logging drivers could send logs via network and write logs to the ephemeral disk of the container comes with complications.
  • Some logs are generated before logging system init - Java is a good example.
  • System Job log collection application has to be run with raw exec to be able to collect stdout/stderr logs from Nomad data alloc dirs.
  • OS system log collection app has to run from the root user to be able to collect Nomad data alloc stderr/stdout files.

Seems like a fluentbit is a CNCF preferred solution for logs collecting it would make sense if Nomad could support streaming its allocation logs to a fluentbit agent.

UPD.
We tried Vector and we decided to drop fluentbit in favor of it. :-D

@mr-karan
Copy link
Contributor

#10219 could be merged.

@tgross
Copy link
Member

tgross commented Mar 24, 2021

Hi @Oloremo! Thanks for opening this issue!

As @mr-karan has noted, there's been a few different requests for this kind of thing. (See here). It's definitely something we want to do and we want to make sure we're tackling the problem holistically. I'll mark this for roadmapping.

@alexdulin
Copy link

Elastic added support for Nomad allocation discovery to their log collecting agent filebeat recently if that is of any help.

@tgross tgross changed the title [feature request] Centralised logging collection Centralised logging collection Mar 24, 2021
@Oloremo
Copy link
Contributor Author

Oloremo commented Mar 24, 2021

@alexdulin Oh, I didn't know that, interesting!

UPD: Hm, well not sure how it's better than just glob. Seems like it's useful if you need to collect not all but specific jobs logs.

@sofixa
Copy link
Contributor

sofixa commented Mar 29, 2021

Personally i'm more in favour of prioritising doing everything to support logging agents ( e.g. adding support for discovery in alternatives to filebeat like Promtail, Vector, fluent*, etc. and making metadata from Nomad available) than adding functionalities inside Nomad to stream logs, mostly because:

  • pull is more reliable than push ( if the logging agent restarts, or crashes or w/e, it can start from where it left over; Nomad would have to do retries and backoffs, and a whole lot of logic to achieve the same level of resilience)
  • pull is more flexible than push ( any logging agent is capable of reading files, if Nomad sends it will have to manage all the different formats ( or at least a bunch of them)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants