I have a java/spring-boot/log4j2 application on an architecture of :
app -> promtail -> loki -> grafana
Currently, my application has a friendly log message system to be read in a console by a developer, nothing ready to search or that really has key info to take advantage of loki and queries.
I'm not sure which is the most practical option to follow, I'm looking at several options:
- I log all the requests that the app receives (post , get , etc... ) using a template to a .json file ( with log4j2 ) and from there to promtail ? this would be easily scalable to another type of information that does not have the same information as the requests ?
- Do I use regex to directly parse the logs I dump to a .log ?
What would you do ? is there a easier way to parse logs?
PS:
I would like to not have to use resources that consume a /actuator like prometheus.
I can't discover docker services (I have to be able to deploy with and without docker the system).
any info is welcome!