Open devel96 opened 10 months ago
Hi @devel96 - Thanks for reaching out!
Not by using Units defaults features, BUT I am currently working on an instrumentation framework guide. I am thinking about providing an exporter for fluentd
and / or Loki
? What that be an option for you?
Hi @devel96 - Thanks for reaching out! Not by using Units defaults features, BUT I am currently working on an instrumentation framework guide. I am thinking about providing an exporter for
fluentd
and / orLoki
? What that be an option for you?
Hi @tippexs , thanks for answer. I am using loki + promtail + container logs. But it's ok for me to switch off unit daemon's stdout logs and use another tool to send it to loki. So is there an option just to switch off all nginx unit daemon's logs ?
I would suggest configuring UNIT's log to point to a different location then the deault one as this will symlinked to stdout
per default. See https://github.com/nginx/unit/blob/846a7f483643a00322f81a7848ca556722e5469a/pkg/docker/template.Dockerfile#L80C1-L80C44
Instead of building everyting new I would suggest using fluentd filter. https://docs.fluentd.org/filter/parser
This will let you scrape the output log of Unit and transformes it into JSON BEFORE it sends the data to the logging backend. These use cases are the things I would like to put in our Logs reference architecture. We will add more about this in 1.33 release.
any update on that? we are on 1.33 already
We'll do planning for 1.34 this week; expect an update then :)
We'll have JSON formatted logging in 1.34, targeting release in January 2025.
@Neks3s As someone looking for this feature, are there any particular constraints / preferences / structures / designs that you'd hope we follow, beyond just "same info but JSON?" :)
Hello. Is there a way to get json logs instead of these ?