nano SIEM
Search Commands

append

Supported in:Self-hosted

Add the rows of a subsearch below your current results, without matching keys.

Use append to add a subsearch's rows below your current results. To merge rows on matching keys, use join.

Syntax

... | append [maxout=<n>] [ <subsearch> ]
ArgumentDefaultDescription
subsearchrequiredA search in square brackets, for example [search class_uid=1007 | stats count by device.hostname].
maxout10000Total rows the subsearch may return. The maximum is 100000.

How it works

  • The subsearch rows follow the main rows. Columns are combined by name; a column that exists on only one side is empty on the other.
  • Both sides must have the same kind of result: both raw events, or both ending in stats or table. Appending a table or stats subsearch to raw events (or the reverse) is rejected with the main search and the appended subsearch produce different result shapes.
  • The subsearch runs over the main search's time range. earliest= and latest= inside the brackets are rejected. To compare periods within that range, bound the rows with where time >= ... and where time < ... in each search.
  • Rows beyond maxout are dropped. Aggregate in the subsearch when you can.
  • To identify each result set, add a label with eval on each side.

Examples

Compare failed and successful logons per user in one labeled table:

class_uid=3002 status_id=2 | stats count as logons by user.name | eval outcome="failed" | append [search class_uid=3002 status_id=1 | stats count as logons by user.name | eval outcome="succeeded"]

Outbound RDP and SMB sources in one list:

class_uid=4001 dst_endpoint.port=3389 | stats count by device.hostname | eval protocol="rdp" | append [search class_uid=4001 dst_endpoint.port=445 | stats count by device.hostname | eval protocol="smb"]

A totals row under a per-source breakdown:

* | stats count by metadata.log_source | append [search * | stats count | eval metadata.log_source="(all sources)"]

DNS lookups and web requests in one table, with a larger subsearch cap:

class_uid=4003 | table time, src_endpoint.ip, query.hostname | append maxout=50000 [search class_uid=4002 | table time, src_endpoint.ip, http_request.url.hostname]

What's next

  • join: merge subsearch rows by key
  • stats: aggregate each side before appending
  • eval: label each side
  • dedup: remove duplicates after a union

On this page