nano SIEM
Search Commands

fields

Supported in:Self-hosted

Keep or remove fields from the result without fixing column order.

Use fields to keep or remove fields from your results. To choose a fixed column order, use table.

Syntax

... | fields [+] <field> [, <field> ...]
... | fields - <field> [, <field> ...]
ArgumentDescription
+ (default)Keep only the listed fields.
-Remove the listed fields and keep everything else.
fieldAn OCSF path, a top-level object such as unmapped, or a field computed earlier in the pipeline. Separate with commas or spaces.

How it works

  • fields changes which fields are returned, not their order. Use table for a fixed column order or display aliases.
  • fields - is the easy way to drop bulky fields such as raw_data and unmapped from a wide event.

Examples

Keep just the network tuple:

class_uid=4001 | fields time, src_endpoint.ip, src_endpoint.port, dst_endpoint.ip, dst_endpoint.port

Drop the original log line and the unmapped spill from wide events:

metadata.log_source=aws_cloudtrail | fields - raw_data, unmapped

Keep only what a hunt needs before aggregating:

class_uid=1007 | fields device.hostname, process.name, process.cmd_line | stats count by device.hostname, process.name

Notes

  • fields also runs after a nano-side stage (lookup, prevalence, inputlookup, resolve_identity, ai, lateral).

What's next

  • table: fixed column order and display aliases
  • rename: rename fields

On this page