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.
The Better Stack collector is the recommended way to automatically gather logs, metrics, and traces without code changes, using eBPF-based auto-instrumentation.
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 → Logs & traces.
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}"
DOCKER_PRESENT=$(command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1 && echo "true" || echo "false")
curl -o "$CONFIG_YAML_PATH" \
"https://telemetry.betterstack.test/vector-yaml/ubuntu/$SOURCE_TOKEN?docker=$DOCKER_PRESENT"
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 → Logs & traces.
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://$INGESTING_HOST/"
encoding:
codec: "json"
compression: "gzip"
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://$INGESTING_HOST/"
encoding.codec = "json"
compression = "gzip"
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/elasticsearch/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/elasticsearch_with_metrics/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/mongodb/$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/postgresql/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/postgresql_with_metrics/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/redis/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/redis_with_metrics/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/rabbitmq/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/rabbitmq_with_metrics/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/redis/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/redis_with_metrics/$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/traefik/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/traefik_with_metrics/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/auth_log/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/docker/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/kubernetes/$SOURCE_TOKEN
https://telemetry.betterstack.com/vector-yaml/ubuntu/$SOURCE_TOKEN?docker=true
https://telemetry.betterstack.com/vector-yaml/ubuntu/$SOURCE_TOKEN?docker=false
https://telemetry.betterstack.com/vector-yaml/ufw/$SOURCE_TOKEN
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.