Send logs and metrics to Better Stack using Vector | Better Stack Documentation

Want to collect telemetry data from your Kubernetes or Docker clusters?

The Better Stack collector is the recommended way to automatically gather logs, metrics, and traces without code changes, using eBPF-based auto-instrumentation.

Start logging in 2 minutes

Collect logs and metrics from your server using Vector.

Select your platform:

Install and configure Vector on Ubuntu or Debian:

Install and configure Vector on any Red Hat-based Linux:

Install and configure Vector on macOS:

Curious about what the script does?

  • Installs Vector using official package.
  • Configures Vector for your Better Stack source.
  • Enables and restarts Vector.

The script will ask for confirmation before making any changes.

You should see your logs in Better Stack → Live tail.

Set up Vector manually

Prefer configuring Vector manually?
Follow step-by-step instructions below.

1. Install

Select your platform:

Configure the Vector APT repository and install Vector:

2. Setup

Download Vector configuration for your source, for example Ubuntu:

Download Vector config

Copied!

Want another config than for Ubuntu?

Our Ubuntu config collects logs for common databases and services.
Pick a different config from available configs or set it up manually.

3. RestartRun Vector

Restart Vector to reload the configuration:

You should see your logs in Better Stack → Live tail.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏

Additional information

Vector sink setup

Want to manually configure Better Stack Vector sink?
Open your Vector config in /etc/vector/vector.yaml/opt/homebrew/etc/vector/vector.yamlC:\Program Files\Vector\config\vector.yaml and add Better Stack sink. It will automatically use all your Vector sources as inputs.

vector.yaml vector.toml

Copied!

Restart Vector to reload the configuration:

Filtering logs and metrics

You can use Vector's Filter transform to selectively forward logs and metrics based on their content. This is useful for reducing noise, controlling costs, or isolating specific event types.

Filter logs in vector.yaml Filter metrics in vector.yaml

Copied!

Restart Vector to reload the configuration:

Available configs

We provide ready-to-use Vector configs for databases, web servers, and other services. Download any config we provide from URLs listed below:

DBs Queues Webservers Proxies System

Copied!