Skip to content

Vector - High-Performance Observability Data Pipeline Cheatsheet

Vector - High-Performance Observability Data Pipeline Cheatsheet

Vector (by Datadog, open-source) is a high-performance observability data pipeline written in Rust. It collects logs, metrics, and traces from any source, reshapes them through transforms, and delivers them to any sink — all vendor-agnostic, so you can switch backends without re-instrumenting. It typically uses a fraction of the CPU and memory of Logstash or Fluentd, which matters when an agent runs on every node.

Installation

MethodCommand
Install script`curl —proto ‘=https’ —tlsv1.2 -sSf https://sh.vector.dev
Debian/Ubuntu.deb from the Vector releases
macOS (Homebrew)brew install vectordotdev/brew/vector
Dockerdocker run -v $PWD/vector.yaml:/etc/vector/vector.yaml timberio/vector:latest-alpine
Verifyvector --version

The Model: Sources → Transforms → Sinks

# vector.yaml
sources:
  app_logs:
    type: file
    include: ["/var/log/app/*.log"]

transforms:
  parse:
    type: remap
    inputs: ["app_logs"]
    source: |
      . = parse_json!(.message)
      .env = "production"
      del(.password)

sinks:
  out:
    type: elasticsearch
    inputs: ["parse"]
    endpoints: ["http://es:9200"]
StagePurpose
sourcesWhere data comes from
transformsParse, filter, enrich, redact, aggregate
sinksWhere data goes
inputsWires components into a DAG

Common Sources

SourceCollects
fileLog files (tailing)
journaldsystemd journal
kubernetes_logsPod logs with k8s metadata
docker_logsContainer logs
http_serverPush endpoint
syslogSyslog over TCP/UDP
prometheus_scrapeScrape metrics endpoints
opentelemetryOTLP ingestion

Common Sinks

SinkSends to
elasticsearchElasticsearch/OpenSearch
lokiGrafana Loki
clickhouseClickHouse
aws_s3S3 (archival)
prometheus_exporterExpose metrics for scraping
datadog_logs / splunk_hecVendor backends
consolestdout (debugging)
blackholeDiscard (testing)

VRL (Vector Remap Language)

The remap transform is where most work happens.

# Parse, enrich, redact, and drop noise
. = parse_json!(.message)
.timestamp = parse_timestamp!(.ts, "%+")
.service = "checkout"
del(.credit_card)
if .level == "debug" { abort }
VRL functionPurpose
parse_json!, parse_regex!, parse_grok!Structure raw text
del(.field)Remove a field (PII redaction)
to_int!, to_float!Type coercion
abortDrop the event
merge, flattenReshape objects

Useful Transforms

TransformDoes
remapVRL-based reshaping (the workhorse)
filterKeep events matching a condition
routeSplit a stream into named branches
aggregateRoll up metrics over an interval
throttleRate-limit noisy events
dedupeDrop duplicates
sampleKeep a percentage of events

Operating Vector

CommandDescription
vector --config vector.yamlRun with a config
vector validateCheck config before deploying
vector testRun unit tests defined in the config
vector topLive TUI of throughput per component
vector tap <component>Stream events flowing through a component
--watch-configHot-reload on config change
# Debug what a transform is actually emitting
vector tap parse

Reliability

FeatureNote
Disk buffersSurvive restarts/backpressure (buffer.type: disk)
AcknowledgementsEnd-to-end delivery guarantees
Adaptive concurrencyAuto-tunes sink request rate
Health checksFail fast on unreachable sinks

Vector vs Alternatives

AspectVectorFluent BitLogstash
LanguageRustCJRuby/JVM
Resource useVery lowVery lowHigh
Transform languageVRL (rich)Lua/filtersRuby/grok
Data typesLogs, metrics, tracesLogs, metricsLogs
Best forVendor-agnostic pipelinesUltra-light edge agentLegacy ELK stacks

Feeds sinks like OpenObserve, Loki, and Elasticsearch; compare with Fluentd.

Resources