Skip to content

Web access log events

High-cardinality access logs with IPs, URLs, HTTP fields and user agents.

simple volume small EventsTransactions
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table web_access_logs rows 30 (
  id          int64 autoincrement primarykey
  client_ip   text ip()
  server_ip   text ipv4()
  remote_ip   text ipv6()
  cidr_block  text cidr()
  mac_address text mac()
  host        text hostname()
  fqdn        text fqdn()
  domain      text domainName()
  path        text url()
  referrer    text httpUrl()
  method      text httpMethod()
  status      int64 httpStatus()
  version     text httpVersion()
  level       text logLevel()
  agent       text userAgent()
  port        int64 port()
  at          timestamp datetime(min: "2024-01-01 00:00:00", max: "2024-06-30 23:59:59")
)

output csv

This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.

About this recipe

Web access logs

A single-table recipe that generates high-cardinality access log events with network addresses, URLs, HTTP fields and user agents.

What it demonstrates

  • Network addresses — client_ip is an IP, server_ip IPv4, remote_ip IPv6, plus a cidr_block and a mac_address.
  • Hosts and domains — host, fqdn and domain cover hostnames, fully qualified names and domains.
  • HTTP request fields — method, status, version, path and referrer describe a request; agent is a user agent and port a port.
  • Log level — level is a log level such as INFO or WARN.

Run it

Submit the recipe body to POST /api/v1/jobs?input_format=gbddl, or paste it into Chef, to generate the data. The repository's local runner (run by task test) also generates it and verifies its output.

The recipe outputs one CSV table file, web_access_logs.csv, holding thirty rows.

Adapt it

  • Raise rows for a high-volume log stream.
  • Add a country same(geo) group to localize the source address.

Guarantees

Every row has a unique id. Addresses and requests are synthetic.

Tested features

Smart types, physical types, rules and formats this recipe exercises and verifies.

ipipv4ipv6cidrmachostnamefqdndomainNameurlhttpUrlhttpMethodhttpStatushttpVersionlogLeveluserAgentportdatetimeautoincrementprimary-key