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

Add Detection Engine health API #643

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class RunKibanaQueries extends BaseQuery {
private static final List<String> pagedActions = Arrays.asList(
new String[] {
"kibana_alerts",
"kibana_detection_engine_find",
"kibana_detection_engine_rules_installed",
"kibana_fleet_agent_policies",
"kibana_fleet_agents",
"kibana_security_endpoint_event_filters",
Expand Down
27 changes: 23 additions & 4 deletions src/main/resources/kibana-rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,37 @@ kibana_alerts_health:
">= 7.11.0 < 7.13.0": "/api/alerts/_health"
">= 7.13.0": "/api/alerting/_health"

kibana_detection_engine_find:
# Calculates health of Detection Engine and returns a health snapshot.
# Scope: the whole cluster = all detection rules in all Kibana spaces.
# https://github.com/elastic/kibana/blob/main/x-pack/plugins/security_solution/common/detection_engine/rule_monitoring/api/detection_engine_health/README.md
kibana_detection_engine_health_cluster:
versions:
">= 7.6.0": "/api/detection_engine/rules/_find?sort_field=enabled&sort_order=asc"
">= 8.8.2": "/internal/detection_engine/health/_cluster"

# Calculates health of Detection Engine and returns a health snapshot.
# Scope: all detection rules in the current/default Kibana space.
# https://github.com/elastic/kibana/blob/main/x-pack/plugins/security_solution/common/detection_engine/rule_monitoring/api/detection_engine_health/README.md
kibana_detection_engine_health_space:
versions:
">= 8.8.2": "/internal/detection_engine/health/_space"

kibana_detection_engine_privileges:
versions:
">= 7.6.0": "/api/detection_engine/privileges"

kibana_detection_engine_signals:
# Returns installed detection rules, both prebuilt and custom. This endpoint requires pagination.
# Scope: current/default Kibana space.
kibana_detection_engine_rules_installed:
versions:
">= 7.6.0": "/api/detection_engine/rules/_find?sort_field=enabled&sort_order=asc"

# Returns status of prebuilt detection rules: how many of them are installed, can be installed, can be upgraded, etc.
# Scope: current/default Kibana space.
kibana_detection_engine_rules_prebuilt_status:
versions:
">= 7.10.0 < 7.15.0": "/api/detection_engine/prepackaged"
">= 7.15.0": "/api/detection_engine/rules/prepackaged/_status"
">= 7.15.0 < 8.9.0": "/api/detection_engine/rules/prepackaged/_status"
">= 8.9.0": "/internal/detection_engine/prebuilt_rules/status"

kibana_fleet_agents:
versions:
Expand Down