google / timesketch

Collaborative forensic timeline analysis
Apache License 2.0
2.58k stars 589 forks source link

Prevent opensearch from aggregating across all indices. #3192

Closed jkppr closed 5 hours ago

jkppr commented 5 hours ago

This PR addresses an issue where Timesketch attempts to execute an OpenSearch query with an empty index list when fetching labels for sketches without active timelines. This defaults to querying _all indices, which can lead to performance issues and the "got more than 100 headers" error due to excessive task management headers and/or large responses in the aggregation.

The following changes were made:

These modifications prevent querying _all indices with empty sketch_indices, improving performance and preventing header limit errors when fetching sketch details for empty sketches or sketches without active timelines.

Closing issues

closes #3191