nano SIEM
Search Commands

rare

Supported in:Self-hosted

The least common values of a field, with a count and a percentage of all events. Good for spotting outliers.

Use rare to find the least common values of a field in your search results. Each value includes a count and percentage.

Syntax

... | rare [limit=<N> | <N>] <field> [by <field> ...] [showcount=<bool>] [showperc=<bool>]
OptionDefaultDescription
N or limit=N10Number of rows to return.
fieldThe field to count. Only one field is used; if you list several, only the first counts.
byCount field per combination with these fields.
showcounttrueInclude the count column.
showperctrueInclude the percent column.

You can start a query with rare and no pipe: rare 5 process.name.

How it works

  • Output columns: the field (and any by fields), count, and percent (share of all events).
  • Rows are ordered by count, lowest first.
  • Events where the field is null count as their own value. Add field=* to the search to leave them out.
  • With by, the limit applies to the combinations overall, not per group.

Examples

Rarely seen processes on endpoints, a common hunting starting point:

class_uid=1007 | rare 20 process.name

Unusual user agents in web traffic:

class_uid=4002 http_request.user_agent=* | rare http_request.user_agent

Rare parent and child process pairs:

class_uid=1007 | rare 20 process.name by actor.process.name

Rare destination ports for outbound connections:

class_uid=4001 | rare dst_endpoint.port

AWS API operations that almost never run:

metadata.log_source=aws_cloudtrail | rare 15 api.operation

Notes

  • rare is rare within the search's time range. For values rare across your whole history, see prevalence.
  • rare runs after a lookup, prevalence, inputlookup, resolve_identity, or ai stage too.

What's next

  • top: most common values
  • prevalence: how often an artifact appears across your environment
  • anomaly: statistical outliers in numeric values

On this page