img
Home > Design Patterns > Log Aggregator

Log Aggregator (Erl, Naserpour)

How can logs generated by multiple microservices be regularly collected and stored in a central location?

Log Aggregator

Problem

Microservices generate and store logs individually within their isolated environments. This can make it difficult to audit or report on solution-wide log data that spans multiple microservices.

Solution

A log aggregator mechanism can be utilized to actively retrieve log data from individual microservice log stores (as well as log information from other solution components), and write the collected log data into a central log store.

Application

The log aggregator can further filter and consolidate log data prior to storage. The Pre-Defined Data View pattern can also be applied to support more efficient log data reporting.

A special aggregator component is utilized to connect to each microservice and read and collect its logs in order to store them in a central repository.

Log Aggregator: Log Aggregator A retrieves the individual log data and stores it in Log Database A, from which the administrator can access them.

Log Aggregator A retrieves the individual log data and stores it in Log Database A, from which the administrator can access them.

This pattern can be applied in applied in conjunction with the Pre-Defined Data View pattern, as explained in the complete pattern description.

Module 10: Advanced Microservice Architecture & Containerization.

This pattern is covered in Module 10: Advanced Microservice Architecture & Containerization..

For more information regarding microservice and containerization courses and accreditation,
visit the Microservice Architect Certification program page..