nano SIEM
Search Commands

search

Supported in:Self-hosted

Filter rows later in the pipeline with search-expression syntax: keywords, field=value, wildcards, regex, IN lists and search-expression precedence.

Use | search to keep matching rows after a pipeline stage. You can refine event results or filter the columns produced by an aggregation. Write your filter with search syntax: keywords, field=value, wildcards, regex, IN lists, and CIDR ranges.

Syntax

... | search <search expression>

The word search at the very start of a query is optional: search class_uid=3002 is the same as class_uid=3002. Starting with search also stops nano from reading the first word as a command, so search top user is a keyword search for "top" and "user".

How it works

  • | search uses the same operators as the base search. See Syntax.
  • After stats, table, or eval, | search filters on the columns that stage produced.

Examples

Drop a noisy process from a keyword hunt:

svchost | search NOT process.name=svchost.exe

Keep only failed logons from public addresses after a broad pull:

class_uid=3002 | search status_id=2 NOT src_endpoint.ip IN CIDR("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16")

Filter aggregated rows with search syntax:

class_uid=3002 status_id=2 | stats count by user.name, src_endpoint.ip | search count>20

Regex on a column after the base search:

class_uid=1007 | search process.cmd_line=/-enc(odedcommand)?\s/

Troubleshoot

Need help with these checks? Contact support with the affected deployment, request ID and time with timezone.

A wildcard filter returns no rows

Check that the field exists in the output of the preceding stage. Both the base search and piped | search support a partial wildcard such as user.name=adm*. You can also use | where like(user.name, "adm%").

A field is missing after an aggregation

Filter on the columns produced by the previous stage. For example, after stats count by user.name, use | search count>20 or a filter on user.name.

What's next

  • where: filter with expressions
  • regex: keep or drop rows by regex
  • Syntax: review the full search-expression grammar

On this page