vectordotdev / vector

A high-performance observability data pipeline.
https://vector.dev
Mozilla Public License 2.0
18.16k stars 1.6k forks source link

Source: fluent, allow sending events to unix socket #17132

Open nhlushak opened 1 year ago

nhlushak commented 1 year ago

A note for the community

Use Cases

We are activelly using Vector as a replacement for FluentD in our ECS Fargate. We successfully utilize logging libraries in our code that are wrapping events via forward protocol and sending them to tcp endpoint in Vector.

But now we are looking towards using Vector sidecar as ECS Firelens container to receive console logs from main containers via fluent logging driver. Unfortunately, sending logs to Firelens container is available only via Unix socket which Vector is currently is not able to do.

Attempted Solutions

We tried using socket source but this is not the case, since data sent in Fluent format.

Current workaround we achieved is to use splunk logging driver and splunk hec source. That is working, but we lack some addtitional info that ECS provides for log events sent through Firelens.

Proposal

Extend fluent source so it could receive data not only through adress (e.g. localhost:24224) but also via UNIX socket (e.g. /var/run/fluent.sock).

References

No response

Version

0.28.2

zamazan4ik commented 1 year ago

We tried using socket source but this is not the case, since data sent in Fluent format.

Hmmm. These words sound like we need to implement fluent codec... With that, using socket source with fluent codec should be ok.

nhlushak commented 1 year ago

@zamazan4ik This might be a solution, indeed.

mrzor commented 1 year ago

socat could help bridging a unix socket to Vector while you wait for a proper fix.