Skip to main content
Version: 5.0

Using Background Tasks

Background tasks are search queries that can be executed in the background without blocking the search interface. This is useful for long-running operations that require significant computational resources. The results of background queries are stored on disk and are available for a specified period, defined in the cluster settings.

Starting a Background Task

To start a background task, enter a query in the search bar, enable the Send to Background option, and click the Send button.

Starting a Background Task

Viewing Results of Background Tasks

The results of background tasks are available in the Main -> Background Tasks section.

The page displaying the results of background tasks is a table containing the following columns:

ColumnDescription
IDA unique identifier for the background task (ID). Clicking on the ID opens a search window with the results of this task.
QueryThe search query used in this background task.
OwnerThe user who initiated the background task.
CreatedThe date and time the background task was started.
DurationThe execution time of the background task.
StatusThe status of the background task.
ActionsThe last column contains a menu with available actions:
- Export Results — exports the result of the background task to a file.
- Delete — deletes the result of the background task from disk.

At the top of the page, there is a search bar and a button to refresh the table.

Exporting Results of a Background Task

Once a background search query is completed, the option to export the results to a file becomes available.

When you click the Export Results button, a modal window opens where you need to enter the File Name and select the File Type. Additionally, you can choose to compress the downloaded file into a zip archive, set the maximum number of events to export, or export all results.

Export Format

The available formats for export are xlsx, json, and csv.

If you select the Compress results into a zip archive option, a zip archive containing the events in the chosen export format will be downloaded.

Export Window

With these settings, after clicking the Export button, a file named test.json will be downloaded, containing up to 10,000 events from the result of the background task.

System Settings for Background Tasks

The settings for background tasks are stored in _cluster/settings. Below is a table with the background task settings and their default values.

NameDescriptionDefault Value
sme.core.background_search.hits_in_fileMaximum number of events in a file on disk.100
sme.core.background_search.result_ttlTime-to-live for the result of a background task, in seconds.86400
sme.core.background_search.auto_purge_intervalInterval for cleaning up outdated background task results, in seconds.60
sme.core.background_search.timeoutTimeout for executing background tasks, in seconds.1800