Random Log Data Generator
Generate realistic random log, metric, and trace data in Apache, JSON, Syslog, NGINX, and NDJSON formats for testing and development.
About
Testing observability pipelines with production data is a security risk. Sharing real logs exposes IPs, usernames, session tokens, and internal infrastructure topology. This generator produces structurally valid log entries across multiple formats - Apache Combined, Syslog RFC 5424, JSON (Elastic Common Schema), NGINX access, and NDJSON - with realistic field distributions. Severity levels follow configurable weighted random selection so your ERROR to INFO ratio mirrors actual systems (typically 1:50). Timestamps distribute uniformly across a user-defined window and sort chronologically. HTTP status codes follow a power-law distribution: ~78% are 2xx, ~12% are 3xx, ~7% are 4xx, and ~3% are 5xx, matching real-world traffic patterns.
The tool also generates OpenTelemetry-compatible trace and span IDs (32-char and 16-char hex strings respectively) and time-series metric data using a random walk algorithm with configurable drift d and variance σ2. All generation runs client-side. No data leaves your browser. Output is limited to 100,000 lines per batch due to browser memory constraints. For load testing at scale, generate multiple batches and concatenate. Note: generated IPs use full 0.0.0.0 - 255.255.255.255 range without filtering reserved blocks - filter post-generation if realism in that dimension matters.
Formulas
Timestamps are generated using uniform random distribution within the specified window, then sorted ascending to simulate chronological log flow:
Where tstart and tend are Unix epoch milliseconds of the user-defined range, and rand() produces a value in [0, 1).
HTTP status code selection uses weighted random sampling. Given weights wk for each status category, the cumulative distribution function determines selection:
Metric data uses a bounded random walk to produce realistic time-series:
Where d = drift (trend bias), σ = volatility, and N(0,1) is a standard normal deviate produced via the Box-Muller transform: z = √−2 ln(u1) ⋅ cos(2πu2).
UUID v4 generation follows RFC 4122: 122 random bits with version nibble set to 0100 and variant bits to 10.
Reference Data
| Format | Standard | Fields Generated | Use Case | Example System |
|---|---|---|---|---|
| Apache Combined | CLF + Referer/UA | IP, identity, user, timestamp, method, path, protocol, status, bytes, referer, user-agent | Web server access log testing | Apache HTTPD, HAProxy |
| NGINX Access | Custom (default format) | IP, timestamp, method, path, protocol, status, bytes, referer, user-agent, request_time | Reverse proxy log analysis | NGINX, OpenResty |
| Syslog RFC 5424 | RFC 5424 | Priority, version, timestamp, hostname, app-name, procid, msgid, structured-data, message | System/daemon log ingestion | rsyslog, syslog-ng |
| JSON (ECS) | Elastic Common Schema 1.x | @timestamp, log.level, message, host.name, service.name, trace.id, span.id, event.dataset | Structured log pipelines | Elasticsearch, Datadog |
| NDJSON | Newline Delimited JSON | timestamp, level, msg, pid, hostname, req_id, duration_ms, caller | Streaming JSON ingestion | Bunyan, Pino, Loki |
| Metric (Prometheus) | Prometheus Exposition | metric_name, labels, value, timestamp_ms | Time-series metric testing | Prometheus, Grafana |
| CSV | RFC 4180 | Configurable columns matching selected format | Spreadsheet/DB import testing | Excel, PostgreSQL COPY |