Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [Security Solution][Detection Engine] log ES requests when running rule preview (#191107) #193425

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…le preview (elastic#191107)

## Summary

**Status:** works only for **ES|QL and EQL** rule types

When clicking on "Show Elasticsearch requests, ran during rule
executions" preview would return logged Elasticsearch queries that can
be used to debug/explore rule execution.
Each rule execution accordion has time rule execution started and its
duration.
Upon opening accordion: it will display ES requests with their
description and duration.

**NOTE**: Only search requests are returned, not the requests that
create actual alerts

Feature flag: **loggingRequestsEnabled**

On week Demo([internal
link](https://drive.google.com/drive/folders/1l-cDhbiMxykNH6BzIxFAnLeibmV9a4Cz))

### Video demo (older UI)

https://github.com/user-attachments/assets/26f963da-c528-447c-9efd-350b4d42b52c

### Up to date UI

#### UI control
<img width="733" alt="Screenshot 2024-09-11 at 12 39 07"
src="https://github.com/user-attachments/assets/c2b1304d-6f93-4e8e-92f9-a6a0b53cefc7">

#### List of executions and code blocks
<img width="770" alt="Screenshot 2024-09-11 at 12 38 23"
src="https://github.com/user-attachments/assets/48b5aa12-174c-46f5-b0bc-a141833b225b">

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

🎉 All tests passed! -
[kibana-flaky-test-suite-runner#6909](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6909)
[✅] [Serverless] Security Solution Detection Engine - Cypress: 100/100
tests passed.
[✅] Security Solution Detection Engine - Cypress: 100/100 tests passed.

FTR tests -
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6918

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 60176bc)
@kibanamachine kibanamachine merged commit 607d71d into elastic:8.x Sep 19, 2024
33 checks passed
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5800 5804 +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.4MB 20.4MB +5.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 87.0KB 87.0KB +26.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 541 542 +1

Total ESLint disabled count

id before after diff
securitySolution 626 627 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @vitaliidm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants