Skip to content

Log Aggregation — Centralizing Logs with Aggregation Systems

DodaTech Updated 2026-06-28 1 min read

In this tutorial, you'll learn about Log Aggregation. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

Log aggregation centralizes logs from multiple services into a searchable, queryable platform for debugging and analysis.

# Filebeat configuration for log shipping
filebeat.inputs:
- type: container
  paths:
    - '/var/lib/docker/containers/*/*.log'
  json.keys_under_root: true
  json.add_error_key: true
  processors:
  - add_docker_metadata:
      host: "unix:///var/run/docker.sock"
  - decode_json_fields:
      fields: ['message']
      target: ''
      overwrite_keys: true

output.elasticsearch:
  hosts: ['https://elastic:9200']
  index: "logs-scanapp-%{+yyyy.MM.dd}"
  ssl.verification_mode: none

# Logstash pipeline
input {
  beats { port => 5044 }
}
filter {
  if [service] == "scan-api" {
    ruby {
      code => 'event.set("[@metadata][target_index]", "scan-api-logs")'
    }
  }
}
output {
  elasticsearch {
    hosts => ["https://elastic:9200"]
    index => "%{[@metadata][target_index]}-%{+YYYY.MM.dd}"
  }
}

Log aggregation provides a single pane of glass for debugging across distributed microservice architectures.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro