rare
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>]| Option | Default | Description |
|---|---|---|
N or limit=N | 10 | Number of rows to return. |
field | The field to count. Only one field is used; if you list several, only the first counts. | |
by | Count field per combination with these fields. | |
showcount | true | Include the count column. |
showperc | true | Include 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
byfields),count, andpercent(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.nameUnusual user agents in web traffic:
class_uid=4002 http_request.user_agent=* | rare http_request.user_agentRare parent and child process pairs:
class_uid=1007 | rare 20 process.name by actor.process.nameRare destination ports for outbound connections:
class_uid=4001 | rare dst_endpoint.portAWS API operations that almost never run:
metadata.log_source=aws_cloudtrail | rare 15 api.operationNotes
rareis rare within the search's time range. For values rare across your whole history, see prevalence.rareruns after alookup,prevalence,inputlookup,resolve_identity, oraistage too.
What's next
- top: most common values
- prevalence: how often an artifact appears across your environment
- anomaly: statistical outliers in numeric values