Generator Source
The Vector generator source
generates logs
Configuration
- Common
- Advanced
- vector.toml
- vector.yaml
- vector.json
[sources.my_source_id]type = "generator" # requiredlines = ["Line 1", "Line 2"] # required
- optionalfloat
batch_interval
The amount of time, in seconds, to pause between each batch of output lines. If not set, there will be no delay.
- View examples
- optionaluint
count
The number of times to repeat outputting the
lines. By default the source will continuously print logs (infinite). - required[string]
lines
The list of lines to output.
- View examples
- optionalbool
sequence
If
true, each output line will start with an increasing sequence number.- Default:
false - View examples
- Default:
Output
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 errorinstance- The Vector instance identified by host and port.job- The name of the job producing Vector metrics.
- counter
processed_bytes_total
The total number of bytes processed by the 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.