From Source

Install Vector from the Vector source code

Before proceeding, please make sure Vector does not support your platform, package manager, or provide a pre-built archive. These are recommended before installing from source.

Because Vector is open source you can download the code and compile it from source. Vector is written in Rust, which means it compiles to a single static binary. There is no runtime and there are no dependencies.

Installation

This guide does not cover cross compiling Vector. This guide is intended to be followed on your target machine.

Start by installing Rust:

curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable

Create a directory to unpack the Vector source into:

mkdir vector

Download and unarchive the Vector source:

edge
latest
curl -OL https://github.com/timberio/vector/archive/master.tar.gz | tar -xzf - --directory="vector"

Change into the vector directory:

cd vector

And build the project via the build Make target:

make build

The vector binary will be placed in target/<target>/release/vector. For example, if you are building Vector on your Mac, your target triple is x86_64-apple-darwin, and the Vector binary will be located at target/x86_64-apple-darwin/release/vector.

Finally, go ahead and start vector:

target/<target>/release/vector --config config/vector.toml

Vector is ready for your system! You'll most likely want to move this binary to somewhere in your $PATH, such as the /usr/local/bin folder. Additionally, you'll need to configure the config/vector.toml file. The Configuration section covers this in great detail.

Configuring

The Vector configuration file is located at:

config/vector.toml

A full spec is located at config/vector.spec.toml and examples are located in config/vector/examples/*. You can learn more about configuring Vector in the Configuration section.

Data Directory

We highly recommend creating a data directory that Vector can use:

mkdir /var/lib/vector

And in your vector.toml file:

data_dir = "/var/lib/vector"

If you plan to run Vector under a separate user, be sure that the directory is writable by the vector process.

Service Managers

Vector includes service files in case you need them:

Init.d

To install Vector into Init.d run:

cp -a distribution/init.d/vector /etc/init.d

Systemd

To install Vector into Systemd run:

cp -a distribution/systemd/vector /etc/systemd/system

Updating

Simply follow the same installation instructions above.