Senior
If we decide to use a self-hosted solution for log collection, what would you set up?
sobes.tech AI
Answer from AI
For a self-hosted log collection solution, I would consider a stack that includes:
- Elasticsearch for storing and indexing logs.
- Logstash or Fluentd for collecting, parsing, and forwarding logs.
- Kibana for data visualization and analysis.
This stack is often called ELK (Elasticsearch, Logstash, Kibana) or EFK (replacing Logstash with Fluentd).
An example architecture:
- An agent (such as Filebeat or Fluentd) runs on each server or container, collecting logs and sending them to Logstash.
- Logstash processes, filters, and transforms logs, then sends them to Elasticsearch.
- Elasticsearch indexes and stores logs.
- Kibana provides a user-friendly web interface for searching and visualizing logs.
This solution is scalable, flexible, and allows quick access to necessary log information.
If a lighter alternative is needed, consider Graylog — also a self-hosted logging platform with a user-friendly interface and processing capabilities.