-
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
Add flapping state object and interface in AAD index and Event Log #143920
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
@@ -37,6 +37,7 @@ import { | |||
TAGS, | |||
TIMESTAMP, | |||
VERSION, | |||
// ALERT_FLAPPING, |
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.
i didn't delete this on purpose. May help the next developer to figure out how to get the flapping object's path for AAD.
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! Verified I see this new field in the alerts-as-data mapping, the event log mapping and returned in the alert summary defaulting to false
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, but one request.
For the uuid PR, I added some function tests in
x-pack/test/alerting_api_integration/spaces_only/tests/alerting/event_log.ts
x-pack/test/alerting_api_integration/spaces_only/tests/alerting/event_log_alerts.ts
These turned out to be super-useful! I found a case were we were generating a recovered event that I had missed setting the uuid. For this PR, I think we'd just check that the flapping property is boolean, in similar cases as the tests check them.
Unfortunately we can't test "flapping" with those integration tests. Rule execution does not add any flapping data to the logs yet. Would you like me to add a default "false" to all alert logs? Then we can test those false values. BTW i moved flapping under |
If we add any tests, lets keep it lightweight as @doakalexi is working on setting true/false appropriately and it'll come with its own series of tests (#143443). Defaulting to false isn't a bad idea to avoid implying undefined is false. |
I checked ECS to see if there was guidance for I don't have a sense for if it's really better to explicitly store the
Cool, I think that's probably the right thing 🤞🏻 |
I added default "false" flapping value to the alert logs |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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 👍🏻
resolves: #143442
This PR intends to create the flapping state object/interfaces in AAD, Event Log and alert summary EP. Then we can add the code to set/unset the state.