Skip to content

Commit

Permalink
[8.x] [Security Solution][Detection Engine] removes legacy alerting e…
Browse files Browse the repository at this point in the history
…ndpoints from Security Solution dev scripts (#197424) (#197987)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution][Detection Engine] removes legacy alerting
endpoints from Security Solution dev scripts
(#197424)](#197424)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Vitalii
Dmyterko","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-28T12:36:23Z","message":"[Security
Solution][Detection Engine] removes legacy alerting endpoints from
Security Solution dev scripts (#197424)\n\n## Summary\r\n\r\n -
addresses
https://github.com/elastic/kibana/issues/95842\r\n\r\n---------\r\n\r\nCo-authored-by:
Ryland Herrick
<[email protected]>","sha":"00f34d9b1cf264a21586b77e829340ccf1b960ff","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:
SecuritySolution","backport:prev-minor","Team:Detection
Engine","v8.17.0"],"title":"[Security Solution][Detection Engine]
removes legacy alerting endpoints from Security Solution dev
scripts","number":197424,"url":"https://github.com/elastic/kibana/pull/197424","mergeCommit":{"message":"[Security
Solution][Detection Engine] removes legacy alerting endpoints from
Security Solution dev scripts (#197424)\n\n## Summary\r\n\r\n -
addresses
https://github.com/elastic/kibana/issues/95842\r\n\r\n---------\r\n\r\nCo-authored-by:
Ryland Herrick
<[email protected]>","sha":"00f34d9b1cf264a21586b77e829340ccf1b960ff"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197424","number":197424,"mergeCommit":{"message":"[Security
Solution][Detection Engine] removes legacy alerting endpoints from
Security Solution dev scripts (#197424)\n\n## Summary\r\n\r\n -
addresses
https://github.com/elastic/kibana/issues/95842\r\n\r\n---------\r\n\r\nCo-authored-by:
Ryland Herrick
<[email protected]>","sha":"00f34d9b1cf264a21586b77e829340ccf1b960ff"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Vitalii Dmyterko <[email protected]>
  • Loading branch information
kibanamachine and vitaliidm authored Oct 28, 2024
1 parent 3027eb1 commit d05a2e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
set -e
./check_env_variables.sh

# Example: ./get_alert_types.sh
# https://github.com/elastic/kibana/blob/main/x-pack/plugins/alerting/README.md#get-apialerttypes-list-alert-types
# Example: ./find_alerting_rules.sh
# https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-findrules
# Related: use ./find_rules.sh to retrieve Detection Engine (Security) rules
curl -s -k \
-u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \
-X GET ${KIBANA_URL}${SPACE_URL}/api/alerts/list_alert_types \
-X GET ${KIBANA_URL}${SPACE_URL}/api/alerting/rules/_find \
| jq .
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ set -e

# Example: ./find_rules.sh
curl -s -k \
-H 'elastic-api-version: 2023-10-31' \
-u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \
-X GET ${KIBANA_URL}${SPACE_URL}/api/detection_engine/rules/_find | jq .
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
set -e
./check_env_variables.sh

# Example: ./get_alert_instances.sh
# https://github.com/elastic/kibana/blob/main/x-pack/plugins/alerting/README.md#get-apialert_find-find-alerts
# Example: ./get_rule_types.sh
# https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-getruletypes
curl -s -k \
-u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \
-X GET ${KIBANA_URL}${SPACE_URL}/api/alerts/_find \
-X GET ${KIBANA_URL}${SPACE_URL}/api/alerting/rule_types \
| jq .

0 comments on commit d05a2e9

Please sign in to comment.