Skip to main content
Global options are top-level configuration settings that apply to your entire Vector instance. These settings control fundamental behaviors like data storage, logging, and acknowledgements.

Configuration

Global options are configured at the top level of your configuration file:
# Global options
data_dir: "/var/lib/vector"

log_schema:
  host_key: "host"
  message_key: "message"
  timestamp_key: "timestamp"

acknowledgements:
  enabled: true

# Component configuration
sources:
  # ...

Data Directory

The directory where Vector stores state data, including disk buffers, file checkpoints, and other persistent data.
data_dir
string
default:"/var/lib/vector"
Path to the directory for persisting Vector state data. Vector must have write permissions to this directory.
data_dir: "/var/lib/vector"

Usage

The data directory is used for:
  • Disk buffers - When sinks use disk buffering
  • File checkpoints - Track file reading positions
  • State data - Component-specific state persistence

Permissions

Vector requires:
  • Read and write access to the data directory
  • Ability to create subdirectories
  • Sufficient disk space for buffers and state

Log Schema

Defines the default field names for core event data across all components.
log_schema
object
Default log schema for all events. Components can override these settings.
log_schema.host_key
string
default:"host"
Field name for the host that generated the event.
log_schema:
  host_key: "hostname"
log_schema.message_key
string
default:"message"
Field name for the event message/content.
log_schema:
  message_key: "msg"
log_schema.timestamp_key
string
default:"timestamp"
Field name for the event timestamp.
log_schema:
  timestamp_key: "ts"
log_schema.source_type_key
string
default:"source_type"
Field name for the source type identifier.
log_schema:
  source_type_key: "source"
log_schema.metadata_key
string
default:"metadata"
Field name for event metadata.
log_schema:
  metadata_key: "meta"

Example

log_schema:
  host_key: "server"
  message_key: "log_message"
  timestamp_key: "event_time"
  source_type_key: "log_source"
  metadata_key: "event_metadata"

sources:
  demo:
    type: demo_logs
    format: json

Acknowledgements

Control how Vector handles end-to-end acknowledgements for event delivery.
acknowledgements
object
Global acknowledgement configuration. Can be overridden per-sink.
acknowledgements.enabled
boolean
default:"false"
Enable acknowledgements globally for all sinks.
acknowledgements:
  enabled: true
When acknowledgements are enabled:
  • Sources wait for sinks to confirm event delivery
  • Prevents data loss during failures
  • Adds latency to event processing
  • Requires sink support for acknowledgements
See the End-to-end Acknowledgements documentation for details.

Timezone

Set the default timezone for timestamp operations.
timezone
string
default:"local"
Default timezone for timestamp conversions. Use any TZ database name or local for system time.
timezone: "America/New_York"
Common timezone values:
  • UTC - Coordinated Universal Time
  • America/New_York - US Eastern Time
  • Europe/London - UK Time
  • Asia/Tokyo - Japan Time
  • local - System local time

Proxy Configuration

Configure HTTP/HTTPS proxy settings for components that make external requests.
proxy
object
Global proxy configuration.
proxy.http
string
HTTP proxy URL.
proxy:
  http: "http://proxy.example.com:3128"
proxy.https
string
HTTPS proxy URL.
proxy:
  https: "http://proxy.example.com:3128"
proxy.no_proxy
array
List of domains to exclude from proxying.
proxy:
  no_proxy:
    - localhost
    - 127.0.0.1
    - "*.internal.example.com"

Example

proxy:
  http: "http://proxy.example.com:3128"
  https: "http://proxy.example.com:3128"
  no_proxy:
    - localhost
    - 127.0.0.1
    - "*.local"

Metrics Expiration

Control how long internal metrics persist before expiring.
expire_metrics_secs
float
default:"300"
Seconds before internal metrics expire after not being updated. Set higher than your metrics scrape interval.
expire_metrics_secs: 600  # 10 minutes

Healthchecks

Configure healthcheck behavior for all sinks.
healthchecks
object
Global healthcheck configuration.
healthchecks.enabled
boolean
default:"true"
Enable healthchecks for all sinks.
healthchecks:
  enabled: true
  require_healthy: false
healthchecks.require_healthy
boolean
default:"false"
Exit during startup if any sink healthcheck fails.
healthchecks:
  require_healthy: true

Enrichment Tables

Define enrichment tables for data augmentation.
enrichment_tables
object
Named enrichment tables that can be used by transforms.

Example

enrichment_tables:
  geoip:
    type: geoip
    path: "/etc/vector/GeoLite2-City.mmdb"

transforms:
  enrich:
    type: remap
    inputs: [logs]
    source: |
      .geo = get_enrichment_table_record!("geoip", {"ip": .client_ip})

Complete Example

# Global Options
data_dir: "/var/lib/vector"

log_schema:
  host_key: "hostname"
  message_key: "log"
  timestamp_key: "ts"
  source_type_key: "source"

timezone: "America/New_York"

proxy:
  http: "http://proxy.internal:3128"
  https: "http://proxy.internal:3128"
  no_proxy:
    - localhost
    - "*.internal"

acknowledgements:
  enabled: true

healthchecks:
  enabled: true
  require_healthy: true

expire_metrics_secs: 600

# Enrichment Tables
enrichment_tables:
  user_data:
    type: file
    file:
      path: "/etc/vector/users.csv"
      encoding:
        type: csv
    schema:
      user_id: string
      name: string
      email: string

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

# Transforms
transforms:
  parse:
    type: remap
    inputs: [app_logs]
    source: |
      . = parse_json!(.log)
      .user = get_enrichment_table_record!("user_data", {"user_id": .user_id})

# Sinks
sinks:
  elasticsearch:
    type: elasticsearch
    inputs: [parse]
    endpoint: "http://localhost:9200"
    bulk:
      index: "logs-%Y-%m-%d"

Next Steps

Build docs developers (and LLMs) love