-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution][Detection Engine] adds legacy siem signals telemetry #202671
[Security Solution][Detection Engine] adds legacy siem signals telemetry #202671
Conversation
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detection-engine (Team:Detection Engine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage collection for snapshot telemetry LGTM. Tested locally too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, thanks for the instructions on booting up a legacy index!
Thanks also for documenting/fixing/improving this code while adding the telemetry!
@@ -57,7 +56,6 @@ export const deleteMigration = async ({ | |||
}); | |||
} | |||
|
|||
await esClient.delete({ index: '.tasks', id: taskId }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for tracking this one down 👍
@@ -40,12 +42,11 @@ export const replaceSignalsIndexAlias = async ({ | |||
], | |||
}, | |||
}); | |||
// TODO: space-aware? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...api_integration/test_suites/detections_response/utils/alerts/migrations/delete_migrations.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ctions_response/utils/alerts/migrations/delete_migrations.ts Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
cc @vitaliidm |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12274008928 |
…try (elastic#202671) ## Summary - partly addresses elastic#195523 - adds snapshot telemetry that shows number of legacy siem signals and number of spaces they are in - while working on PR, discovered and fixed few issues in APIs - get migration status API did not work correctly with new `.alerts-*` indices, listing them as outdated - finalize migration API did account for spaces, when adding alias to migrated index - remove migration API failed due to lack of permissions to removed migration task from `.tasks` index ### How to test #### How to create legacy siem index? run script that used for FTR tests ```bash node scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load x-pack/test/functional/es_archives/signals/legacy_signals_index ``` These would create legacy siem indices. But be aware, it might break Kibana .alerts indices creation. But sufficient for testing #### How to test snapshot telemetry Snapshot For snapshot telemetry use [API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api) call OR Check snapshots in Kibana adv settings -> Global Settings Tab -> Usage collection section -> Click on cluster data example link -> Check `legacy_siem_signals ` fields in flyout <details> <summary> Snapshot telemetry </summary> <img width="2549" alt="Screenshot 2024-12-03 at 13 08 03" src="https://github.com/user-attachments/assets/28ffe983-01c7-4435-a82a-9a968d32d5e0"> </details> --------- Co-authored-by: Ryland Herrick <ryalnd@gmail.com> (cherry picked from commit 8821e03)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…telemetry (#202671) (#203744) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Detection Engine] adds legacy siem signals telemetry (#202671)](#202671) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vitalii Dmyterko","email":"92328789+vitaliidm@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-12-11T10:03:19Z","message":"[Security Solution][Detection Engine] adds legacy siem signals telemetry (#202671)\n\n## Summary\r\n\r\n- partly addresses https://github.com/elastic/kibana/issues/195523\r\n- adds snapshot telemetry that shows number of legacy siem signals and\r\nnumber of spaces they are in\r\n- while working on PR, discovered and fixed few issues in APIs\r\n- get migration status API did not work correctly with new `.alerts-*`\r\nindices, listing them as outdated\r\n- finalize migration API did account for spaces, when adding alias to\r\nmigrated index\r\n- remove migration API failed due to lack of permissions to removed\r\nmigration task from `.tasks` index\r\n\r\n### How to test\r\n\r\n#### How to create legacy siem index?\r\n\r\nrun script that used for FTR tests\r\n\r\n```bash\r\nnode scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load x-pack/test/functional/es_archives/signals/legacy_signals_index\r\n\r\n```\r\nThese would create legacy siem indices. But be aware, it might break\r\nKibana .alerts indices creation. But sufficient for testing\r\n\r\n\r\n#### How to test snapshot telemetry\r\n\r\nSnapshot\r\nFor snapshot telemetry use\r\n[API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api)\r\ncall\r\nOR\r\nCheck snapshots in Kibana adv settings -> Global Settings Tab -> Usage\r\ncollection section -> Click on cluster data example link -> Check\r\n`legacy_siem_signals ` fields in flyout\r\n\r\n<details>\r\n<summary> Snapshot telemetry </summary>\r\n\r\n\r\n<img width=\"2549\" alt=\"Screenshot 2024-12-03 at 13 08 03\"\r\nsrc=\"https://github.com/user-attachments/assets/28ffe983-01c7-4435-a82a-9a968d32d5e0\">\r\n\r\n\r\n </details>\r\n\r\n---------\r\n\r\nCo-authored-by: Ryland Herrick <ryalnd@gmail.com>","sha":"8821e034e9c6cc4ad42915e54b429defd6b970b5","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","backport:prev-minor","Team:Detection Engine"],"title":"[Security Solution][Detection Engine] adds legacy siem signals telemetry","number":202671,"url":"https://github.com/elastic/kibana/pull/202671","mergeCommit":{"message":"[Security Solution][Detection Engine] adds legacy siem signals telemetry (#202671)\n\n## Summary\r\n\r\n- partly addresses https://github.com/elastic/kibana/issues/195523\r\n- adds snapshot telemetry that shows number of legacy siem signals and\r\nnumber of spaces they are in\r\n- while working on PR, discovered and fixed few issues in APIs\r\n- get migration status API did not work correctly with new `.alerts-*`\r\nindices, listing them as outdated\r\n- finalize migration API did account for spaces, when adding alias to\r\nmigrated index\r\n- remove migration API failed due to lack of permissions to removed\r\nmigration task from `.tasks` index\r\n\r\n### How to test\r\n\r\n#### How to create legacy siem index?\r\n\r\nrun script that used for FTR tests\r\n\r\n```bash\r\nnode scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load x-pack/test/functional/es_archives/signals/legacy_signals_index\r\n\r\n```\r\nThese would create legacy siem indices. But be aware, it might break\r\nKibana .alerts indices creation. But sufficient for testing\r\n\r\n\r\n#### How to test snapshot telemetry\r\n\r\nSnapshot\r\nFor snapshot telemetry use\r\n[API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api)\r\ncall\r\nOR\r\nCheck snapshots in Kibana adv settings -> Global Settings Tab -> Usage\r\ncollection section -> Click on cluster data example link -> Check\r\n`legacy_siem_signals ` fields in flyout\r\n\r\n<details>\r\n<summary> Snapshot telemetry </summary>\r\n\r\n\r\n<img width=\"2549\" alt=\"Screenshot 2024-12-03 at 13 08 03\"\r\nsrc=\"https://github.com/user-attachments/assets/28ffe983-01c7-4435-a82a-9a968d32d5e0\">\r\n\r\n\r\n </details>\r\n\r\n---------\r\n\r\nCo-authored-by: Ryland Herrick <ryalnd@gmail.com>","sha":"8821e034e9c6cc4ad42915e54b429defd6b970b5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202671","number":202671,"mergeCommit":{"message":"[Security Solution][Detection Engine] adds legacy siem signals telemetry (#202671)\n\n## Summary\r\n\r\n- partly addresses https://github.com/elastic/kibana/issues/195523\r\n- adds snapshot telemetry that shows number of legacy siem signals and\r\nnumber of spaces they are in\r\n- while working on PR, discovered and fixed few issues in APIs\r\n- get migration status API did not work correctly with new `.alerts-*`\r\nindices, listing them as outdated\r\n- finalize migration API did account for spaces, when adding alias to\r\nmigrated index\r\n- remove migration API failed due to lack of permissions to removed\r\nmigration task from `.tasks` index\r\n\r\n### How to test\r\n\r\n#### How to create legacy siem index?\r\n\r\nrun script that used for FTR tests\r\n\r\n```bash\r\nnode scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load x-pack/test/functional/es_archives/signals/legacy_signals_index\r\n\r\n```\r\nThese would create legacy siem indices. But be aware, it might break\r\nKibana .alerts indices creation. But sufficient for testing\r\n\r\n\r\n#### How to test snapshot telemetry\r\n\r\nSnapshot\r\nFor snapshot telemetry use\r\n[API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api)\r\ncall\r\nOR\r\nCheck snapshots in Kibana adv settings -> Global Settings Tab -> Usage\r\ncollection section -> Click on cluster data example link -> Check\r\n`legacy_siem_signals ` fields in flyout\r\n\r\n<details>\r\n<summary> Snapshot telemetry </summary>\r\n\r\n\r\n<img width=\"2549\" alt=\"Screenshot 2024-12-03 at 13 08 03\"\r\nsrc=\"https://github.com/user-attachments/assets/28ffe983-01c7-4435-a82a-9a968d32d5e0\">\r\n\r\n\r\n </details>\r\n\r\n---------\r\n\r\nCo-authored-by: Ryland Herrick <ryalnd@gmail.com>","sha":"8821e034e9c6cc4ad42915e54b429defd6b970b5"}}]}] BACKPORT--> Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>
…try (elastic#202671) ## Summary - partly addresses elastic#195523 - adds snapshot telemetry that shows number of legacy siem signals and number of spaces they are in - while working on PR, discovered and fixed few issues in APIs - get migration status API did not work correctly with new `.alerts-*` indices, listing them as outdated - finalize migration API did account for spaces, when adding alias to migrated index - remove migration API failed due to lack of permissions to removed migration task from `.tasks` index ### How to test #### How to create legacy siem index? run script that used for FTR tests ```bash node scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load x-pack/test/functional/es_archives/signals/legacy_signals_index ``` These would create legacy siem indices. But be aware, it might break Kibana .alerts indices creation. But sufficient for testing #### How to test snapshot telemetry Snapshot For snapshot telemetry use [API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api) call OR Check snapshots in Kibana adv settings -> Global Settings Tab -> Usage collection section -> Click on cluster data example link -> Check `legacy_siem_signals ` fields in flyout <details> <summary> Snapshot telemetry </summary> <img width="2549" alt="Screenshot 2024-12-03 at 13 08 03" src="https://github.com/user-attachments/assets/28ffe983-01c7-4435-a82a-9a968d32d5e0"> </details> --------- Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
Summary
.alerts-*
indices, listing them as outdated.tasks
indexHow to test
How to create legacy siem index?
run script that used for FTR tests
These would create legacy siem indices. But be aware, it might break Kibana .alerts indices creation. But sufficient for testing
How to test snapshot telemetry
Snapshot
For snapshot telemetry use API call
OR
Check snapshots in Kibana adv settings -> Global Settings Tab -> Usage collection section -> Click on cluster data example link -> Check
legacy_siem_signals
fields in flyoutSnapshot telemetry