#general

Docker Swarm Cluster Logs with OpenObserve

TLDR arun asked how to collect logs from Docker services; Prabhat suggested using Vector or Fluentbit. arun found a ready-made solution and successfully implemented Vector.

Powered by Struct AI

3

1

18
5mo
Solved
Join the chat
Jun 15, 2023 (6 months ago)
arun
Photo of md5-0e0e2259002665b2bb3f1e87eae4b39e
arun
01:46 PM
Hi! I just setup openobserve on my docker swarm cluster, looking to migrate from ES stack. What component do i need to start getting logs from my docker services?
Prabhat
Photo of md5-23052f31f8f3c4b1bb3297fbc3a2aec5
Prabhat
01:50 PM
You will need a log forwarder that can tail the log files created by docker and send them to OPenObserve
01:50
Prabhat
01:50 PM
You could use fluentbit or vector for this
01:51
Prabhat
01:51 PM
01:52
Prabhat
01:52 PM
01:52
Prabhat
01:52 PM
docker log files are generally present in /var/log/containers
arun
Photo of md5-0e0e2259002665b2bb3f1e87eae4b39e
arun
01:55 PM
Hi, thanks for the answers. I checked and there are no log files in that directory, im not sure how logstash does it but from a user perspective, the docker logs can be shown via the docker service logs <service name> command. I will check fluentbit and vector to see if they offer anything
01:56
arun
01:56 PM
im guessing fluentbit is like filebit, which ingests files/logs from the filesystem?
01:57
Prabhat
Photo of md5-23052f31f8f3c4b1bb3297fbc3a2aec5
Prabhat
01:57 PM
yeah, you got a readymade one. Good searcher

1

arun
Photo of md5-0e0e2259002665b2bb3f1e87eae4b39e
arun
01:58 PM
i'll try and see, thanks for your help!
Craig
Photo of md5-6fe3c7a15dc56f7a510aea6c129a7486
Craig
08:32 PM
Can Elastic Agent send to OpenObserve?
https://www.elastic.co/elastic-agent

Elastic Agent is a process of processes which runs Filebeat, Metricbeat
Prabhat
Photo of md5-23052f31f8f3c4b1bb3297fbc3a2aec5
Prabhat
11:27 PM
We haven't tested elastic agent. Filebeat is supported though.
Craig
Photo of md5-6fe3c7a15dc56f7a510aea6c129a7486
Craig
11:29 PM
If you are curious about the internals of elastic-agent, and how it incorporates filebeat:

https://www.youtube.com/watch?v=xwdCuhN2uTM

1

Prabhat
Photo of md5-23052f31f8f3c4b1bb3297fbc3a2aec5
Prabhat
11:30 PM
Thanks. Will take a look.
Craig
Photo of md5-6fe3c7a15dc56f7a510aea6c129a7486
Craig
11:30 PM
elastic agent is one complicated thing, but for people stuck on elastic…..
Jun 16, 2023 (5 months ago)
Gaby
Photo of md5-540a8e08ce1c199c4efaeb0388742259
Gaby
12:08 AM
👍 for using Vector, works out of the box with OpenObserve :-)
Jun 19, 2023 (5 months ago)
arun
Photo of md5-0e0e2259002665b2bb3f1e87eae4b39e
arun
07:05 AM
just wanted to report that it worked! i used vector and i am not ingesting the logs from docker. since i run vector as a docker service in docker swarm i had to mount /var/run/docker.sock:/var/run/docker.sock inside

2

OpenObserve

OpenObserve is an open-source, petabyte-scale observability platform for the cloud native realm, offering a 10x cost reduction and 140x less storage use compared to competitors like Elasticsearch or Splunk. Built in Rust for exceptional performance, it offers comprehensive features like logs, metrics, traces, dashboards, and more | Knowledge Base powered by Struct.AI

Indexed 404 threads (74% resolved)

Join Our Community