Generator Source

The Vector generator source ingests data through an internal data generator and outputs log events.

Configuration

vector.toml
[sources.my_source_id]
type = "generator" # required
lines = ["Line 1", "Line 2"] # required

Options

  • floatoptional

    batch_interval

    The amount of time, in seconds, to pause between each batch of output lines. If not set, there will be no delay.

    • No default
    • View examples
  • uintoptional

    count

    The number of times to repeat outputting the lines.

    • Default: "infinite"
  • [string]commonrequired

    lines

    The list of lines to output.

    • No default
    • View examples
  • booloptional

    sequence

    If true, each output line will start with an increasing sequence number.

    • Default: false
    • View examples

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.