vectordotdev / vectordotdev/vector
Document `docker` source installation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.6k
- Forks
- 2.3k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
We need better documentation on how to setup the docker source. This was a conversation in our chat:
Hi there,
I'm once more considering Vector to replace my current "log ingestion process".
All the app that we want to monitor run on a docker container. So currently, we use fluentbit as the "log driver" to parse / transform the logs.
I've looked at vector's docker source module and it seems to work quite differently than fluentbit.
In our case fluentbit itself run in a container, from what I understood, the plugin was installed directly inside of docker, docker then route the logs to a port... inside a container.
If I wanted to use vector I would have to install on the server itself, bare metal ?
Would it be possible to run a container with both vector and docker installed in it so that I don't require to install docker to the server ? I'm far from a docker expert, but that seems like it could potentially cause some sort of problems (to run a docker inside a container) ?
Maybe you have some experience with a similar flow ?
Cheers.
And @a-rodin responded with:
Hi, it is possible to pass the Docker socket from the host inside the Vector container to allow Vector communicate with the Docker engine. It can be done by mounting /var/run/docker.sock. For example if you run Vector as docker run vector, an additional option -v/var/run/docker.sock:/var/run/docker.sock can be added to the list of command line arguments to do this. For docker-compose.yml it is possible to mount it like this:
version: '3'
services:
vector:
image: timberio/vector:nightly-alpine
volumes:
- ./vector.toml:/etc/vector/vector.toml
- /var/run/docker.sock:/var/run/docker.sock
Note that if you use console sink, you might want to not include the Vector's container to the list of containers it watches for.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Docker source documentation and reviewing the source module's setup requirements. Document running Vector in a container with /var/run/docker.sock mounted, including the docker run and docker-compose.yml examples from the issue. Mention excluding Vector's own container when using the console sink; done means users can follow the documented container setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100