Vector Sink

The Vector vector sink streams log events to another downstream vector source.

Configuration

  • Common
  • Advanced
vector.toml
[sinks.my_sink_id]
# REQUIRED
type = "vector" # must be: "vector"
inputs = ["my-source-id"] # example
address = "92.12.333.224:5000" # example
# OPTIONAL
healthcheck = true # default

Options

3 items
stringcommonrequired

address

The downstream Vector address to connect to. The address must include a port.

No default
View examples
tableoptional

buffer

Configures the sink specific buffer behavior.

int (events)commonrequired

max_events

The maximum number of events allowed in the buffer.

Default: 500 (events)
Only relevant when: type = "memory"
View examples
int (bytes)commonrequired

max_size

The maximum size of the buffer on the disk.

No default
Only relevant when: type = "disk"
View examples
stringenumcommonrequired

type

The buffer's type and storage mechanism.

Default: "memory"
Enum, must be one of: "memory" "disk"
View examples
stringenumoptional

when_full

The behavior when the buffer becomes full.

Default: "block"
Enum, must be one of: "block" "drop_newest"
View examples
boolcommonoptional

healthcheck

Enables/disables the sink healthcheck upon start. See Health Checks for more info.

Default: true
View examples

How It Works

Buffers

The vector sink buffers events as shown in the diagram above. This helps to smooth out data processing if the downstream service applies backpressure. Buffers are controlled via the buffer.* options.

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.

Health Checks

Health checks ensure that the downstream service is accessible and ready to accept data. This check is performed upon sink initialization. If the health check fails an error will be logged and Vector will proceed to start.

Require Health Checks

If you'd like to exit immediately upon a health check failure, you can pass the --require-healthy flag:

vector --config /etc/vector/vector.toml --require-healthy

Disable Health Checks

If you'd like to disable health checks for this sink you can set the healthcheck option to false.

Streaming

The vector sink streams data on a real-time event-by-event basis. It does not batch data.