LOGMETRIC

console sink

The console sink streams log and metric events to standard output streams, such as STDOUT and STDERR.

Configuration

  • Common
  • Advanced
vector.toml
[sinks.my_sink_id]
# REQUIRED - General
type = "console" # example, must be: "console"
inputs = ["my-source-id"] # example
# REQUIRED - requests
encoding = "json" # example, enum
# OPTIONAL - General
target = "stdout" # default, enum

Options

3 items
commonstringenumrequired

encoding

The encoding format used to serialize the events before outputting.

No default
Enum, must be one of: "json" "text"
View examples
booloptional

healthcheck

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

Default: true
View examples
commonstringenumoptional

target

The standard stream to write to.

Default: "stdout"
Enum, must be one of: "stdout" "stderr"
View examples

Output

The console sink streams log and metric events to standard output streams, such as STDOUT and STDERR.

How It Works

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 thehealthcheck option to false.

Streaming

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