search
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
| searchuses the same operators as the base search. See Syntax.- After
stats,table, oreval,| searchfilters on the columns that stage produced.
Examples
Drop a noisy process from a keyword hunt:
svchost | search NOT process.name=svchost.exeKeep 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>20Regex 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.