I am new to developing a Kotlin application and would like to have a tool to centrally manage logs. Since I'm already using Grafana + Prometheus for monitoring, I decided to use Loki as a data source, and use loki-logback-appender in the Kotlin application to send data directly to Loki. I am able to retrieve these in Grafana.
And then there's the Promtail tool, which can do some extra things that I won't use yet (I haven't quite figured out the logging requirements yet). Why should I use it when the application itself already delivers the data to Loki?
Why should I use it when the application itself already delivers the data to Loki?
You shouldn't: if your application already instrumented to send logs into loki there no need for Promtail.
This situation can be compared to Prometheus. If your application is instrumented with some library it exposes metrics by itself. But if not - you can use some exporter, mysql_exporter for example, to provide interface for Prometheus scraping without modification of your application itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With