Browse docs
On this page

obi search

Run a query language search over your events from the terminal, with time windows, saved queries, and output for piping.

obi search runs a query language search and prints the results.

Shell
obi search 'QUERY' [flags]

obi query is the same command.

Examples

Shell
obi search 'level:error service:payments'
obi search 'level:error | stats count() by service' --from now-24h
obi search --saved "Payments errors"
obi search '*' --from now-15m -o json
obi search 'service:checkout' -o raw | grep timeout
obi search 'level:error' --all-time --limit 500 --page 2

Events print as log lines and aggregations print as a table. The window is the last hour unless you pass --from.

Flags

FlagMeaning
--from TIMEStart of the window: relative (now-7d) or an ISO time. Default now-1h.
--to TIMEEnd of the window. Default now.
--all-timeSearch every event still stored.
-l, --limit NEvents per page. Default 100.
--page NPage number. Default 1.
--saved NAMERun a saved query. A query you also give is added to it.
--organizationAlso search the workspaces that share their events with your organization.
-o, --output FORMATtable (log lines), wide (every column), raw (messages only), json, or yaml.