-
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 health API: cluster health endpoint #165602
[Security Solution] Detection Engine health API: cluster health endpoint #165602
Conversation
b0ae005
to
9953b1d
Compare
buildkite test this |
95c29ae
to
0ccb716
Compare
19a939d
to
4ad9e6b
Compare
e4b5676
to
f698b49
Compare
f698b49
to
b1efca5
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
{ term: { [f.EVENT_PROVIDER]: ALERTING_PROVIDER } }, | ||
{ term: { [f.EVENT_ACTION]: 'execute' } }, | ||
{ term: { [f.EVENT_CATEGORY]: 'siem' } }, |
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.
By adding { term: { [f.EVENT_CATEGORY]: 'siem' } }
we make sure we don't aggregate those rules that are not detection rules.
totalExecutions: { | ||
cardinality: { | ||
field: f.RULE_EXECUTION_UUID, | ||
}, | ||
}, |
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.
Moving this cardinality aggregation under executeEvents
is also important to correctly calculate the number of executions of detection rules.
b322ff3
to
48224dc
Compare
48224dc
to
93a67fb
Compare
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Checked the implementation and tested by calling different methods. LGTM.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @banderror |
Epic: #125642
Summary
This PR implements the
_cluster
health endpoint. It returns the same metrics as the_space
health endpoint. The difference is that:_cluster
health endpoint calculates its metrics on top of data from all Kibana spaces_space
health endpoint calculates its metrics on top of data from the current Kibana space (the one specified in the URL)Additionally, it fixes a few bugs in the existing health endpoints related to scoping. This PR ensures that we only aggregate detection rules in the saved objects and the
.kibana-event-log-*
indices, and not any types of rules.RBAC
The
_cluster
health endpoint can be called by any user with at least Read privilege to Security Solution.Documentation
I also updated the health API's README and added a new document describing what health data we return from what endpoints:
Checklist
Delete any items that are not applicable to this PR.