Skip to main content

Log Generator

Overview​

Log Generator emits synthetic log records in a chosen format at a configurable rate. Drop it onto a pipeline to exercise parsers, filters, routing, and destinations without configuring a real source.

Each node emits a single format. To produce mixed traffic, add several Log Generator nodes with different formats.

Supported platforms

  • Linux: Logs
  • Windows: Logs
  • macOS: Logs

Basic Configuration​

ParameterTypeDefaultRequiredDescription
formatstringjson_flatYesFormat emitted by this node. Options: json_flat, json_nested, json_pretty, plain, syslog_rfc3164, syslog_rfc5424, logfmt, csv, web_access, cef, windows_event_json.
service_namestringloggenNoUsed as the service.name resource attribute on every record.

Performance​

ParameterTypeDefaultRequiredDescription
ratenumber1000NoRecords per second. Set 0 or enable Max Throughput to emit as fast as the pipeline accepts.
max_throughputbooleanfalseNoIgnore Rate and emit as fast as the downstream consumer accepts.
batch_sizeinteger100NoRecords per emitted batch. Range 1–100000. Larger batches raise throughput and coarsen backpressure.

Note: Enabling Max Throughput disables the Rate field. Use it for load testing; use Rate when you want a steady, predictable volume.

Advanced Configuration​

ParameterTypeDefaultRequiredDescription
severity_mixobjectnoneNoRelative weights per log level: TRACE 0.5, DEBUG 4, INFO 80, WARN 10, ERROR 5, FATAL 0.5. Weights, not percentages.
max_recordsinteger0NoStop after N records. 0 means run forever.
payload_pad_bytesinteger0NoPad each record up to this many bytes to simulate larger logs. 0 means off. Maximum 1048576.
seedinteger0NoSeed for reproducible output. 0 means seed from the clock.

Example Configuration​

{
"format": "json_flat", // default: "json_flat"
"service_name": "loggen", // default: "loggen"

"rate": 1000, // default: 1000
"max_throughput": false, // default: false
"batch_size": 100, // default: 100

"severity_mix": {
"INFO": 80, // default: 80
"WARN": 10, // default: 10
"ERROR": 5, // default: 5
},

"advanced": {
"max_records": 0, // default: 0 (run forever)
"payload_pad_bytes": 0, // default: 0 (off)
"seed": 0, // default: 0 (seed from clock)
},
}