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
| Flag | Meaning |
|---|---|
--from TIME | Start of the window: relative (now-7d) or an ISO time. Default now-1h. |
--to TIME | End of the window. Default now. |
--all-time | Search every event still stored. |
-l, --limit N | Events per page. Default 100. |
--page N | Page number. Default 1. |
--saved NAME | Run a saved query. A query you also give is added to it. |
--organization | Also search the workspaces that share their events with your organization. |
-o, --output FORMAT | table (log lines), wide (every column), raw (messages only), json, or yaml. |