Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[RAM] Mark disabled alerts as Untracked in both Stack and o11y #164788
[RAM] Mark disabled alerts as Untracked in both Stack and o11y #164788
Changes from 25 commits
a801e1e
8ac28c3
1db7232
7ef4cd7
8488fe9
a4ac597
5ff37f3
3cf2e5a
839d858
d185d41
9f37561
f4b61ff
d56ab0c
dcb5a77
99b644f
72b9f60
2db2f5f
90acc70
79d6ac2
1f243c6
84f707f
1de7e21
2903a3b
87209f5
870a131
ac26389
ce89b91
ddb2cd1
bac60b8
a18cf49
3ba23a2
2fd6a11
a8b37f2
36283a5
dd412bd
dae99ee
e7f3403
0624ea6
2d6ffd7
2867b41
6259846
e1e74fa
7ff8935
0b4aba7
cbb17c1
895e9ac
ef6457f
5b384e6
30d4d88
c2ec732
f512be7
f3407f1
645e1e6
e6ee727
29d3192
b94e238
38e29a1
a669d03
f3b85df
cda79f1
8df838e
c6c1ef1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
For the index threshold & ES query rule type, the AAD docs are not flattened, so using this script, the resulting doc ends up with:
Is there any way to avoid this?
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.
Is it just those two rule types specifically or are there potentially more of them? Is there some kind of flag we can look for to know which rule types aren't flattened?
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 believe anything written by the lifecycle registry is flattened, anything written by the alerting framework is not. I think you should be able to use the alerts definition registered with the rule type. If
ruleType.alerts.shouldWrite=true
it should be unflattened. Iffalse
orundefined
, it should be flattened.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.
Never mind, figured out a way to handle this in Painless
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.
Even better!
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.
Drive-by comment. I think it would make more sense to pass in the AlertsService to the RulesClientFactory -> RulesClient and use it directly there to create the alerts client rather than adding this pass through function in the rule type registry
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.
Yeah that makes sense. This PR has been ballooning out of control with so many different services and plugins getting added to new things, and core types getting modified, and the number of file changes exploding, that I've been doing everything I can to avoid not adding another thing that's going to trigger a typecheck failure across an unpredictable number of test files, but I guess we've already crossed that threshold. My instinct as a developer to keep PRs small does not work with the reality of the Kibana codebase.
I'll get to it.