-
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
[Response Ops][Alerting] Using alertsClient
for legacy siem notification rule types to write default alerts-as-data docs
#174553
Conversation
@@ -46,7 +46,7 @@ import { | |||
} from '../../../../../common/api/detection_engine/signals_migration/mocks'; | |||
|
|||
// eslint-disable-next-line no-restricted-imports | |||
import type { LegacyRuleNotificationAlertType } from '../../rule_actions_legacy'; | |||
import type { LegacyRuleNotificationRuleType } from '../../rule_actions_legacy'; |
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.
did some alert
to rule
renaming
3e9a3ab
to
94271d8
Compare
/ci |
Pinging @elastic/response-ops (Team:ResponseOps) |
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 and alerts are written in .internal.alerts-security.alerts-default
not .alerts-default.alerts-default
.
LGTM If above is expected.
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 did some testing and discovered the following behaviour:
Generated alert is displayed in alert table now and when clicking on the rule title it says rule is deleted


Which is not deleted, but displayed in that way because it's not proper Security rule.
We do not show this legacy notification rile in UI at all. And now when alert is generated and exposed in UI, similarly legacy rule is exposed as well.
Is there a way for us to not show generated alert in alerts table?
results_link: | ||
'/app/security/detections/rules/id/rule-id?timerange=(global:(linkTo:!(timeline),timerange:(from:1576255233400,kind:absolute,to:1576341633400)),timeline:(linkTo:!(global),timerange:(from:1576255233400,kind:absolute,to:1576341633400)))', | ||
rule: { | ||
alert_suppression: undefined, |
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.
looks like almost all properties of this large rule object are identical in 4 tests cases. Is it possible to retrieve them in one variable and then just spread in different properties.
for example:
rule: {
...ruleMock
meta: {
kibana_siem_app_url: 'http://localhost',
}
}
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.
Resolved in this commit: c90430a
@vitaliidm Thanks for your review! I pushed a commit to exclude the legacy rule type from being displayed. |
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 for implementing the feedback
No legacy alerts displayed in alerts table anymore
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Unknown metric groupsReferences to deprecated APIs
History
To update your PR or re-run it, just comment with: cc @ymao1 |
Towards https://github.com/elastic/response-ops-team/issues/164
Resolves #171795
Summary
alertsClient
from alerting framework in favor of the deprecatedalertFactory
default
alert config for these rule types so framework level fields will be written out into the.alerts-default.alerts-default
index with no rule type specific fields.alert
torule
To Verify
.alerts-default.alerts-default
that looks like: