Skip to main content

Search events

Use Search to find events and the alerts raised from them, check what happened on a host or to a user, and narrow a large result down to the few events that matter.

Role needed: Search: Read. A query over Cases also needs Cases: Read. A role sees the events and alerts its Event pre filter allows, and all of them when the filter is blank. See What your role lets you see.

Run a query​

  1. Select Search in the navigation menu. The first tab runs as soon as the page opens, over events and alerts for Today.
  2. Write a query in the editor. You can type ThreatVIS PPL, or just a word or phrase such as password. A plain word searches every field. See ThreatVIS PPL basics.
  3. Choose a time range with the time range picker. See Choose a time range and time zone.
  4. Select Run, or press Enter in the editor. Press Shift and Enter to start a new line without running.

Search page with a tab named Untitled, the time zone Etc/UTC, the range Last 24 Hours and the Run button above a query for authentication events, the footer showing the run time and events matched, and the time histogram below

The Search page after a query for authentication events over Last 24 Hours: the tab bar and time controls at the top, the query editor, the footer with the run time and number of events matched, and the histogram.

A query that names no source searches events and alerts together. The footer of the editor shows how long the query took and how many events matched, for example 29,474 events matched. If the query fails, a 1 error button appears there; select it to read the message.

Read the event list​

The default view is the Event List. Each row is one event or alert.

PartWhat it shows
TimeWhen the event happened, in the time zone shown in the time controls, using the time column you chose in the time range picker.
EventThe selected fields that the event has, each as field = value. If an event has none of the selected fields, the row shows every field it has.
Chevron at the start of the rowOpens every field of the event in place.

Events are listed newest first, by the time column. A query that ends with head is run exactly as written and returns at most that many rows, for example | sort host.hostname | head 20.

An alert is marked with a bar on its left edge. Select anywhere on an alert row, other than on one of its values, to open its details. The alert details are described in Alerts and threat intelligence.

Under the list, Rows per page sets how many rows show on a page: 10, 20, 50, 100 or 200. The default is 20. Use the page numbers to move through the results. Changing the page size runs the search again from page 1.

Choose which fields to show​

The Filters panel on the left lists the fields in your results. See Act on a field value for what each field offers.

  • Select the plus button beside a field (Add to Selected Fields) to show it in every row. Select the minus button (Remove from Selected Fields) to take it away. The Clear selected fields button removes them all.
  • Open an event with its chevron to see every field. Tick a field there to add it to your selection, untick it to remove it, and drag a field to change its place. Hide empty fields hides fields the event has no value for.

Your selection is saved with your account, up to 100 fields, and applies in every browser you sign in from. A new account starts with the alert fields (rule name, severity, risk score, workflow status and reason) followed by host.ip, host.hostname, event.code, log.level, user.name, event.eventmap_subtype, event.action, event.category and event.dataset. A row shows only the selected fields it has a value for.

The Filters panel lists three groups:

GroupFields
Selected fieldsThe fields you chose to show.
Interesting fieldsOther fields that have values in the results or in the time range.
Empty fieldsFields that have no value in the time range. Select the chevron to open the group.

Find Column filters the list by name. Filter by field type limits it to chosen field types. The type shown beside a field is inferred from its name and sample values, so treat it as a guide.

Select results and copy them​

Tick the checkbox at the start of a row, or the box in the header to tick the whole page. A Selected menu appears in the toolbar with these items:

ItemWhat it does
Copy selection as textCopies the selected rows as tab-separated text.
Copy selection as MarkdownCopies the selected rows as a Markdown table.
Copy results as JSONCopies the selected events as JSON.
Show selected results onlyHides the other rows. The item then reads Show all results.
Clear selectionUnticks every row.

A new page of results starts with nothing selected. To download everything the query matches, see Save, share and export a search.

Work in several tabs​

The tab bar at the top holds your searches.

To do thisDo this
Open another searchSelect the plus button (New tab). A new tab does not run until you select Run.
Rename a tabSelect the tab's Actions menu, then Rename.
Copy a tabSelect Actions, then Duplicate. The copy keeps the query and time range, and runs if the original had run.
Close a tabSelect Close tab. The last tab cannot be closed.
Preview a tabHold the pointer over it to see its query and name.

You can have up to eight tabs. When you reach eight, the plus button is disabled and its tooltip reads Maximum of 8 search tabs. Each tab keeps its query, results, time range and view while you work in another.

Show and hide panels​

The panel buttons above the results hide or show the Filters panel (Hide field list), the histogram (Hide visualization) and the results (Hide results). One of the histogram and the results always stays visible. Your choice is remembered in the browser. Drag the edge between the Filters panel and the results to change the panel's width, or focus it and use the left and right arrow keys.

Reuse earlier queries​

The tools at the right of the editor footer help you write queries.

ToolWhat it does
Prettify queryLays the query out one stage per line.
Keyboard shortcutsLists the shortcuts: Enter runs the query, Shift Enter adds a new line, Ctrl Space shows suggestions and Esc closes them.
Add query to StarredKeeps the current query in your starred list.
Show recent queriesOpens a panel with a Recent tab (your last 20 queries) and a Starred tab (up to 50). Each entry shows whether it ran or failed and when. Use the buttons on an entry to star it, run it again or copy it.
PPL helpOpens a short quick reference of the common stages.

The editor suggests fields, commands, functions and lookup files as you type. Recent and starred queries are kept in your browser, for your account, so they do not follow you to another browser. To keep a query for everyone who works with you, see Save, share and export a search.

Check which days were searched​

Select Matched Indices (the database icon in the results toolbar) to see the days that your time range covers and whether each can be searched. The Status column shows each day as open, closed or missing. A banner counts the days in the range that are closed. Only open days are searched, so a search over closed or missing days returns nothing.

The status bar​

The bar at the bottom of the page shows Query status (Running, Done or Error), Execution time, Hits (the number of events matched), Rows (the rows returned, shown when it differs from the hits) and EPS (events matched per second of run time).

If a search returns nothing​

The results area reads No matching results with the advice to adjust the query or widen the time range. Check these in turn:

  1. The time range. The default is Today, which starts at midnight in the time zone shown.
  2. The time column. A search by @timestamp and one by @ingesttimestamp can return different events. See Choose a time range and time zone.
  3. The query. Remove conditions one at a time to find the one that excludes everything.
  4. Matched Indices. Closed days in the range are not searched.

If the search is still empty, or shows an error you cannot resolve, see Search returns no results.

Next steps​