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.
Collect logs and metrics from your server using Vector.
Select your platform:
Install and configure Vector on Ubuntu or Debian:
curl -sSL https://telemetry.betterstack.com/setup-vector/ubuntu/$SOURCE_TOKEN \
-o /tmp/setup-vector.sh && \
bash /tmp/setup-vector.sh
Curious about what the script does?
The script will ask for confirmation before making any changes.
You should see your logs in Better Stack → Live tail.
Prefer configuring Vector manually?
Follow step-by-step instructions below.
Select your platform:
Configure the Vector APT repository and install Vector:
bash -c "$(curl -L https://setup.vector.dev)"
apt-get install vector
Download Vector configuration for your source, for example Ubuntu:
CONFIG_YAML_PATH="/etc/vector/vector.yaml"
BACKUP_SUFFIX=".bak-$(date +%Y%m%d%H%M%S)"
mv "${CONFIG_YAML_PATH}" "${CONFIG_YAML_PATH}${BACKUP_SUFFIX}"
curl -o "$CONFIG_YAML_PATH" \
https://telemetry.betterstack.com/vector-yaml/ubuntu/$SOURCE_TOKEN
Our Ubuntu config collects logs for common databases and services.
Pick a different config from available configs or set it up manually.
Restart Vector to reload the configuration:
systemctl restart vector
You should see your logs in Better Stack → Live tail.
Please let us know at hello@betterstack.com.
We're happy to help! 🙏
Want to manually configure Better Stack Vector sink?
Open your Vector config in /etc/vector/vector.yaml
and add Better Stack sink. It will automatically use all your Vector sources as inputs.
transforms:
better_stack_transform:
type: "remap"
inputs:
- "*"
source: |
.dt = del(.timestamp)
sinks:
better_stack:
type: "http"
method: "post"
inputs:
- "better_stack_transform"
uri: "https://in.logs.betterstack.com/"
encoding:
codec: "json"
auth:
strategy: "bearer"
token: "$SOURCE_TOKEN"
[transforms.better_stack_transform]
type = "remap"
inputs = [ "*" ]
source = '''
.dt = del(.timestamp)
'''
[sinks.better_stack]
type = "http"
method = "post"
inputs = [ "better_stack_transform" ]
uri = "https://in.logs.betterstack.com/"
encoding.codec = "json"
auth.strategy = "bearer"
auth.token = "$SOURCE_TOKEN"
Restart Vector to reload the configuration:
systemctl restart vector
We provide ready-to-use Vector configs for databases, web servers, and other services. Download any config we provide from URLs listed below:
https://telemetry.betterstack.com/vector-yaml/postgresql/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/mysql/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/mysql_with_metrics/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/mongodb/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/redis/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/apache/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/nginx/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/haproxy/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/auth_log/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/ufw/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/docker/$SOURCE_TOKEN