Centralised Logging:- Loki Stack consisting of Promtail, Loki and Grafana
Grafana Loki needs to store two different types of data: chunks and indexes. Loki receives logs in separate streams, where each stream is uniquely identified by its tenant ID and its set of labels. As log entries from a stream arrive, they are compressed as “chunks” and saved in the chunks store. The index stores each stream’s label set and links them to the individual chunks.
Log retention is needed whenever we want to do some detail analysis or debug an issue. Depends on the requirements log retention can be setup. We can setup for 1 day, 7 days, 15 days, 1 month or for a year depends how much budget is available for storage.
With respect to Bahmni, we have implemented persistent logs configurations inside our helm-charts. All the implementation is automated & is executed using github workflows. Bahmni is using Compactor storage setup.
In Bahmni, we are using below configurations to setup our log retention: