Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.
/ docs Public archive

Add guide on reassembling multi-segment messages - #407

Open
zedoraps wants to merge 1 commit into
mainfrom
feat/cisco-ise-ocsf-package
Open

Add guide on reassembling multi-segment messages#407
zedoraps wants to merge 1 commit into
mainfrom
feat/cisco-ise-ocsf-package

Conversation

@zedoraps

@zedoraps zedoraps commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🔍 Problem

  • Some log sources cap transport-message size and split a single logical event into several numbered segments sharing an id.
  • Segments arrive interleaved and ids get reused over time, so the partial messages are useless until reassembled.
  • TQL had no guide documenting how to put such segments back together.

🛠️ Solution

  • New generic guide guides/parsing/reassemble-multi-segment-messages (sidebar: Guides → Parsing).
  • Documents the pattern: frame segments with parse_grok, gather them with an outer window and an inner group keyed on the id, then sort + collect + first to concatenate payloads in order.
  • window outermost (not group) so state is bounded to the open windows rather than one subpipeline per near-unique id; the note explains why and when to invert.
  • Points at work-with-time for supplying an event-time field, and at the cisco::ise::* operators as a real-world implementation.

💬 Review

  • window-outer vs group-outer equivalence verified by running both on interleaved sample data; output is identical.
  • Example pipelines verified to run; markdownlint passes on the changed file.
⚙️ Code PR: tenzir/library#161

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

📦 Preview  ·  🟠 Still propagating

The deploy completed, but the public URL has not served build 510acd9 yet. Check again in a minute.

@zedoraps
zedoraps marked this pull request as draft June 22, 2026 15:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ce795c8a1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch 5 times, most recently from 0f1ac73 to 8ae0c10 Compare June 22, 2026 17:08
@github-actions github-actions Bot added the reference Reference documentation label Jun 22, 2026
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch 9 times, most recently from 2ccacdd to 64ca62a Compare June 24, 2026 12:59
@zedoraps
zedoraps marked this pull request as ready for review June 25, 2026 13:20
@zedoraps
zedoraps requested a review from mavam June 25, 2026 13:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64ca62a1a6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated

@mavam mavam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reads really well!

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from 64ca62a to edf17ea Compare June 25, 2026 15:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edf17ea38e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from edf17ea to 9088017 Compare June 25, 2026 15:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9088017348

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from 9088017 to 6aa94b7 Compare June 26, 2026 08:21
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from 6aa94b7 to bb00bf8 Compare June 26, 2026 08:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb00bf81c8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch 2 times, most recently from 1d27d69 to 6ffce79 Compare June 26, 2026 09:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d27d694b9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from 6ffce79 to 6b8c66d Compare June 26, 2026 09:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b8c66dd45

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/content/docs/guides/parsing/reassemble-multi-segment-messages.mdx Outdated
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch 2 times, most recently from 90398fe to a3a1c2a Compare June 26, 2026 15:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3a1c2a3ec

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from a3a1c2a to 396d3d5 Compare June 26, 2026 16:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 396d3d5c81

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from 396d3d5 to f156ff6 Compare June 26, 2026 17:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f156ff6540

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +334 to +336
- **Reused identifiers.** A reused single-segment id is disambiguated by its
payload; reused multi-segment ids are not reliably solvable, because a
continuation does not say which header it belongs to.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the single-segment reuse exception

Fresh evidence is this limitation bullet, which now says reused single-segment ids are disambiguated by payload, but the gather pipeline groups only by message_id and the duplicate step keys only message_id, segment_number. When two one-segment messages reuse the same id within the same 3×span window, their payloads are concatenated into one message (or one is dropped after deduplicate), so this exception contradicts the documented reuse constraint and can make readers accept an unsafe reuse interval.

Useful? React with 👍 / 👎.


```tql
window size=$span * 3, every=$span, on=ts, idle_timeout=$span {
// ...sort, deduplicate, emit guard as before...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the emit guard after summarize

When readers splice this completeness snippet into the gather pipeline, this comment places the “emit guard as before” before summarize, but that guard relies on first_segment_window_start and header_window_start, which are only created by the summarize below. Following the snippet literally filters on missing fields or before grouping, so the snippet should show the guard after the summarized fields are produced.

Useful? React with 👍 / 👎.

@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from f156ff6 to 87f676b Compare June 26, 2026 17:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87f676b929

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +309 to +311
Each message comes out whole even though its segments arrive out of order and
seconds apart. What matters is the spread of one message's own segments, not their
arrival order or the real-time gaps in the stream. Remove `delay` to replay the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Account for idle_timeout in live gaps

With the copied windows setting idle_timeout=$span, a live or sparse source that pauses for more than $span of wall-clock time between segments can have the target window force-closed before the next segment arrives, even when their ts values are still within the reassembly span; the later segment is then late/dropped or emitted separately. This sentence tells readers real-time gaps do not matter, so the guide should either size idle_timeout to the expected inter-segment wall-clock gap or call out that limitation.

Useful? React with 👍 / 👎.

Document the pattern for reassembling a logical message that a source
split across several transport messages, matching the cisco::ise::reassemble
operator: frame each segment, gather them with overlapping (hopping) event-time
windows and an emit guard, deduplicate redelivered segments, tell reused
single-segment ids apart, and report completeness so incomplete messages flow
downstream instead of vanishing. Include a delay-based example for live timing.
Add a reciprocal See also link on the window reference, and document on the raw
parsing option that inference drops leading zeros from numeric identifiers.

Assisted-by: Claude Opus 4.8 (1M context) (Claude Code)
@zedoraps
zedoraps force-pushed the feat/cisco-ise-ocsf-package branch from 87f676b to 510acd9 Compare June 26, 2026 18:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 510acd975a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +31 to +33
The Tenzir Library's [Cisco package](https://github.com/tenzir/library/tree/main/cisco)
applies the whole pattern in this guide to Cisco ISE syslog, as the
`cisco::ise::reassemble` and `cisco::ise::parse` operators.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not point readers to missing ISE operators

The linked Cisco package currently only exposes Umbrella DNS content, so readers who follow this callout cannot find cisco::ise::reassemble or cisco::ise::parse in the referenced main/cisco tree. Until those operators are published at that link, this sends users looking for the full implementation to a package that does not contain it; either link to the exact branch/path that has ISE support or avoid naming these operators here.

Useful? React with 👍 / 👎.

Comment on lines +6 to +10

By default the parser infers richer types from values, which can change them: a
zero-padded numeric identifier such as `0001133664` becomes the number
`1133664`, losing its leading zeros. Set `raw=true` to keep such fields as text
so they survive verbatim.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope the raw warning to inferring parsers

This partial is also rendered on JSON/YAML/XML parser pages, where the new example is misleading: a quoted JSON identifier like "0001133664" is already a native string and is not inferred into 1133664 unless a schema/conversion says so. Because this shared option text now tells readers to use raw=true for a transformation those parsers do not perform by default, please qualify the warning for grok/xsv-style inference or move the zero-padding example out of the generic partial.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

guide How-to guides reference Reference documentation site Site infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants