Skip to main content

Generators and event types

A generator is a source technology: Palo Alto NGFW, Microsoft Entra ID, Office 365… It carries event types, and each event type carries a template describing the shape of a log from that technology, and the pool of samples it draws from.

Generators are edited in the catalog workspace, like archetypes, scenarios and datasets: the addresses have not moved (/generators, /generators/…), but each technology and each event type opens in a tab, beside the datasets it reads.

In the explorer​

Generators comes first in the explorer, as in the menu. A technology's row is both a document and a folder: its name opens the technology, its chevron — or Space, → and ← — unfolds its event types, then a Data group holding its own pools. An event type reserved for alerts carries an alerts badge. The pools of a technology live under it, and under it only: the Datasets catalog keeps the populations and the shared pools.

A search finds an event type by its name and its technology's — answer bind finds Bind's client-answer. An event type's tab is named after both: Bind · client-answer.

The generator​

FieldRole
Technology nameFunctional identity, unique. The technical identifier is derived from it
Displayed labelThe name the screen shows
VendorInformational only
Output formatPicks the validator applied to the preview
Alerts onlyExcludes the technology from the continuous flow: it only emits on scenario

The technology name is fixed at creation, and so is its identifier: the intake formats, the engine tables and the seed address the technology by it, and renaming it would create a silent namesake there. Everything else — Displayed label, Vendor, Description, Output format, Fed by alerts only — is edited in the inspector's Properties.

The source corpus is not only JSON. Five output shapes coexist:

FormatExample technology
JSONMost of them — Office 365, GitHub, Google Workspace…
CEFFortinet FortiGate
CSVPalo Alto NGFW, one line of 60+ positional fields
KEY_VALUEVeeam Backup & Replication, between square brackets
TEXTVMware ESXi and vCenter, Systancia Cleanroom — bare syslog

The technology's document​

The centre has three sub-views; the inspector, when nothing else is chosen, gives the technology's Properties, its Identity (identifier, technology name, slug — fixed), a Summary, the Problems and the deletion.

Sub-viewWhat it shows
Event typesThe table of event types, with an Emission column — what the engine does with each —, and the form to add one
CoverageAction by action, the technology's event types in the order the engine retains them
DataThe technology's pools, how many rows, and which event types draw from them; the shared pools they read; New pool for this technology

What a technology emits​

A technology renders one event type per gesture: the heaviest of those that describe the action, ties broken by name. The others are not emitted — unless the heavier one cannot describe the gesture: a web proxy log does not carry an SMTP submission, a log only a server writes says nothing when no server is targeted. The Coverage and Emission read this rule from the engine itself, so the screen cannot announce what the engine does not do:

StateMeaning
retainedIt describes the gesture
fallbackIt only leaves when those ahead of it cannot describe the gesture — a non-web flow, no server targeted
never emittedAnother event type describes each of its gestures — it yields to that one
alerts onlyWeight 0: only a scenario launch renders it, as a fallback

Raising an event type's weight above the one it yields to makes it the retained one: the weight is a priority, not a frequency.

The event type​

FieldRole
NameIn kebab-case. It used to be the name of the .jinja file in the source
CategoryAUTH, PROCESS, NETWORK, FILE, DNS, ALERT or ASSET
WeightPriority among the technology's event types that describe an action. 0 = alerts only
FormatInherited from the technology, unless explicitly overridden
DataThe dataset the engine draws a sample from

Category, Weight and Format are edited in the inspector's Properties; emptying Format goes back to the technology's. The name is fixed, for the same reason as the technology name: the seed and the engine tables address the event type by its technology and its name — the inspector shows that engine key.

A zero weight is a state, not an absence​

An event type with weight 0 is never emitted in the normal flow: it exists only to be triggered by an alert scenario. This is not a way of disabling it — it is a mode of operation in its own right, used by 178 of the corpus's 470 event types.

The format may depart from the technology's​

Palo Alto NGFW emits CSV, but its dns event type is JSON. Four event types in the corpus depart this way. The event type then carries its own value; otherwise it inherits, and the interface shows “inherited”.

This is visible in the editor, on a badge: JSON — departs from CSV. The preview always validates against the effective format, never against the technology's.

The event type's document​

The template is Nunjucks, a direct port of the legacy project's Jinja2 — 467 of the 470 templates compile, the last three stumbling on a Python idiom.

The document has three sub-views:

  • Template — the source, in a syntax-highlighted editor, and its rendering beside it;
  • Data — the attached pool, editable as a table or as JSON (see the attached pool);
  • Send — sending the rendering to an intake, and the latest dispatches.

The template is a draft of the workspace: it survives a trip to another document, Ctrl+S saves it, Ctrl+Z undoes it (see the workspace). The inspector holds the event type's Properties, its Scope, its Realised actions — each one followed by what the technology does with it: retained, fallback, never emitted — yields to … —, its Attached pool, its Problems and its deletion.

The palette​

The Available fields sit in the explorer pane, below the tree, as the action library does for an archetype. A click inserts the snippet at the cursor position; the search field keeps the fields whose label, description or snippet contains each word typed. It offers the fields of the rendering context, grouped:

GroupContents
User / Serveruser.name, user.desktop_ip, server.agent_id…
Timestamptimestamp.isoformat(), seven strftime formats, epoch in seconds and milliseconds
Identifiersuuid4(), hexId(n), bigDigits(n), derivedId(…)
Randomnessrandint, choice, weightedChoice, zpad, publicIp()
Structuresloops, conditionals, set, | tojson
Dataset fieldsComputed from the keys actually present in the attached dataset — of its draft, if it is being edited

Random drawing is deterministic: with the same seed, two previews are identical. No Math.random enters the rendering.

The preview​

The rendering refreshes as you type, a moment after the last key; Generate a preview does it at once, and is the path without JavaScript. It renders against an entity of the workspace's reference population — by default, the slice the event type observes: a server for a machine log, a site for a served request, a user otherwise; Render with picks another. Without a reference population, it renders against the mock user, server and website.

When a pool is attached, its row is drawn as the engine draws it: among the rows the entity can produce — its OS, and no row naming a profile for a machine —, at a position the preview states (“Pool row 3 — 5 of 6 playable by this entity”). Another sample draws the next one; the rest of the rendering does not move. The preview reads the saved pool: an unsaved change to the pool is announced, not rendered.

It then checks that the output honours the declared format:

  • JSON must parse — the error is located by line and column;
  • CEF must start with CEF: and carry at least seven header fields;
  • CSV must fit on a single line and count at least 20 commas;
  • KEY_VALUE must contain at least one key="value" pair;
  • all formats: a {{ or a {% surviving the rendering is an error.

The warnings​

They do not block saving, they flag:

  • unguarded JSON value — "pid": {{ sample.pid }} renders "pid": when the key is missing, which breaks the JSON. A | default(0) is enough. This is the corpus's most frequent defect, hence the 934 | default(…) it contains. A name set at the top of the template to a literal that is already a JSON value counts as guarded — {%- set keywords = "-9214364837600034816" -%}, which Windows writes bare on purpose: | int would round a 64-bit integer. Set under an {% if %}, reassigned to an expression, or used before being set, it is still flagged;
  • unknown context root — usr.name instead of user.name renders empty, silently;
  • unknown filter — read only inside {{ … }} and {% … %}, outside string literals: the | of a CEF header or of a PowerShell command in a fallback is not a filter.

A source that does not compile is refused outright: a broken template in the database would only be discovered at emission time, on a whole batch lost.

The same rules are read as you type, in the inspector's Problems, with what else the event type will not produce: an empty template, a template that reads sample with no pool attached, keys the template reads without a fallback that no row of the pool carries, an unclassified scope, an emitter no action retains. The status bar counts them. A key read with a fallback — sample.bytes | default(…), an empty fallback included, or inside a condition — is an option, not a gap: the template renders its fallback, and nothing is reported.

The attached pool​

The inspector's Attached pool picks the pool — the technology's own, or a shared one; never a population — and Detach unhooks it; choosing “None” detaches too. New pool for this event type creates an empty pool under the technology, named after the event type, and attaches it.

The Data sub-view edits that pool as a table or as JSON, without leaving the event type, and Save the pool — or Ctrl+S while it is shown — saves it. It is the same draft as the dataset's own tab: a cell changed here shows up, modified, in the dataset's tab, and the other way round. A pool shared with other event types says so: changing it changes them too.

Sending the message​

The Send sub-view ships exactly the rendering shown by the Template to an intake. This is the only way to know whether a ported template is really accepted: a message that validates locally may very well be refused on arrival.

  • Destination — one of the 7 SEKOIA regions, whose URL the product knows, or a custom URL (a test webhook, a local stub). The URL field stays visible at all times: it is only required for the custom destination.
  • Intake key — passed to the intake in the request body, never stored in the database or logged. It only travels through the queue, for the duration of the dispatch.

The posted body is the one of the SEKOIA API: {"intake_key": "…", "jsons": ["<the message>"]}.

An output the validator deems invalid can still be sent: the intake is precisely what we are trying to question, and its verdict is the only one that settles the matter.

The path is the real production path: the screen puts the message on the log-dispatch queue, api-sender consumes it and posts. What is displayed afterwards is the real result of the dispatch — HTTP status, duration, error message — not a queueing acknowledgement.

StatusWhat it says
SentThe intake answered 2xx.
FailedDefinitive refusal (4xx), or 5 unsuccessful attempts against an outage (5xx, network).
Still in flightNobody consumed the queue in time. The message is not lost: it leaves as soon as api-sender is back.

A 5xx or a network cut is retried 5 times with exponential backoff; a 4xx is not — a rejected intake key will not fix itself by insisting.

“Latest dispatches of this event type” lists the last five dispatches of the event type currently open, not of the whole instance: on an editing screen, it is the history of what you are editing that informs. The global view lives on the Dispatches screen.

From the corpus​

Every deployment — production included — replays the corpus snapshot, which rewrites what it seeds: a technology's label, description, vendor, output format and “alerts only”; an event type's category, weight, format, attached pool and template; a pool's name, description, category and every row the corpus seeds. A change made on the screen to one of them is undone at the next deployment. Those documents carry a From the corpus badge, and the inspector says what will be rewritten. What survives: the scope and the actions corrected by hand, and everything created on the screen — an event type added to a seeded technology included.

Deleting​

Every event type and every generator carries a delete button, in two steps: the first click shows a confirmation that quantifies what goes (“and its 13 event types, templates included”), the second executes.

Deleting a generator does not destroy its datasets: they become shared and stay editable. Deleting an event type does not destroy its dataset either.