Generator Source

The Vector generator source generates fakes events, useful for testing, benchmarking, and demoing.

Configuration

[sources.my_source_id]
type = "generator" # required
format = "shuffle" # required
  • optionaluint

    count

    The total number of lines to output. By default the source continuously prints logs (infinitely).

    • enumcommonrequiredstring

      format

      The format of the randomly generated output.

      • Syntax: literal
      • Enum, must be one of: "shuffle" "apache_common" "apache_error" "syslog" "bsd_syslog" "json"
    • optionalfloat

      interval

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

    • optional[string]

      lines

      The list of lines to output.

      • Only relevant when: `format` = `shuffle`
    • optionalbool

      sequence

      If true, each output line starts with an increasing sequence number, beginning with 0.

      • Only relevant when: `format` = `shuffle`
      • Default: false

    Telemetry

    This component provides the following metrics that can be retrieved through the internal_metrics source. See the metrics section in the monitoring page for more info.

    • counter

      processed_events_total

      The total number of events processed by this component. This metric includes the following tags:

      • component_kind - The Vector component kind.

      • component_name - The Vector component ID.

      • component_type - The Vector component type.

      • file - The file that produced the error

      • instance - The Vector instance identified by host and port.

      • job - The name of the job producing Vector metrics.

    • counter

      events_out_total

      The total number of events emitted by this component. This metric includes the following tags:

      • component_kind - The Vector component kind.

      • component_name - The Vector component ID.

      • component_type - The Vector component type.

      • instance - The Vector instance identified by host and port.

      • job - The name of the job producing Vector metrics.

    How It Works

    Context

    By default, the generator source will augment events with helpful context keys as shown in the "Output" section.

    State

    This component is stateless, meaning its behavior is consistent across each input.