-
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
[RAC] Decouple registry from alerts-as-data client #98935
Conversation
@dgieselaar I did a first pass on this PR and the rule registry changes look great! Much lighter weight and I like the idea of component templates and not creating an index until it is actually needed. I think one of the missing pieces is the idea of the rule/alert The other question which has been raised is whether we should be writing to a consumer based alerts index instead of a producer based alerts index. That way a solution has access to all rule data for rules created within the solution, regardless of whether the rule is security/stack/o11y by querying the |
Pinging @elastic/apm-ui (Team:apm) |
Pinging @elastic/uptime (Team:uptime) |
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.
Limits change LGTM!
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.
Rule registry changes LGTM! 👍 Thanks for the decoupling here @dgieselaar! 🙂
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Any counts in public APIs
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI 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!
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.
Had a note about updating the config keys, but otherwise looks good.
To disable writing entirely: | ||
|
||
```yaml | ||
xpack.ruleRegistry.write.enabled: 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.
This will also need to be done here https://github.com/dgieselaar/kibana/blob/120521feb6b3359613601a10af329e0aca100645/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker#L279 and here in the readme https://github.com/dgieselaar/kibana/blob/120521feb6b3359613601a10af329e0aca100645/x-pack/plugins/observability/README.md#L22-L23
I'm ok with this being in follow-up if you want to get this merged.
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 think the first one is generated, I've opened an issue for the second one: #100039.
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.
It says it's generated but it's not.
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.
☠️
@@ -2,62 +2,129 @@ | |||
|
|||
The rule registry plugin aims to make it easy for rule type producers to have their rules produce the data that they need to build rich experiences on top of a unified experience, without the risk of mapping conflicts. | |||
|
|||
A rule registry creates a template, an ILM policy, and an alias. The template mappings can be configured. It also injects a client scoped to these indices. | |||
The plugin installs default component templates and a default lifecycle policy that rule type producers can use to create index templates. |
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.
These doc changes are super helpful. Thanks!
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Co-authored-by: Dario Gieselaar <[email protected]>
These files were moved in elastic#98935 but the script has become out of date.
* Update output directory for generative script These files were moved in #98935 but the script has become out of date. * Update ECS fieldmap with ECS 1.12 This fieldmap was missing fields from ECS 1.11+. Notable ommissions were the threat.indicator and threat.enrichments fieldsets. * Remove non-additive mappings changes These are incompatible with the current alerts framework. * Add only necessary threat fields for CTI features This could probably be pared down further, as most of these fields are not critical for CTI features. Additionally, these additions now exceed the limit of 1000 fields and is causing an error in the ruleRegistry bootstrapping. * Remove file.pe threat fields * Remove geo threat indicator fields * Remove all threat.indicator mappings These are not relevant for alerts, which will only have enrichments. * increments index mappings total fields limit to 1200 Co-authored-by: Ece Ozalp <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…8812) * Update output directory for generative script These files were moved in elastic#98935 but the script has become out of date. * Update ECS fieldmap with ECS 1.12 This fieldmap was missing fields from ECS 1.11+. Notable ommissions were the threat.indicator and threat.enrichments fieldsets. * Remove non-additive mappings changes These are incompatible with the current alerts framework. * Add only necessary threat fields for CTI features This could probably be pared down further, as most of these fields are not critical for CTI features. Additionally, these additions now exceed the limit of 1000 fields and is causing an error in the ruleRegistry bootstrapping. * Remove file.pe threat fields * Remove geo threat indicator fields * Remove all threat.indicator mappings These are not relevant for alerts, which will only have enrichments. * increments index mappings total fields limit to 1200 Co-authored-by: Ece Ozalp <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…119874) * Update output directory for generative script These files were moved in #98935 but the script has become out of date. * Update ECS fieldmap with ECS 1.12 This fieldmap was missing fields from ECS 1.11+. Notable ommissions were the threat.indicator and threat.enrichments fieldsets. * Remove non-additive mappings changes These are incompatible with the current alerts framework. * Add only necessary threat fields for CTI features This could probably be pared down further, as most of these fields are not critical for CTI features. Additionally, these additions now exceed the limit of 1000 fields and is causing an error in the ruleRegistry bootstrapping. * Remove file.pe threat fields * Remove geo threat indicator fields * Remove all threat.indicator mappings These are not relevant for alerts, which will only have enrichments. * increments index mappings total fields limit to 1200 Co-authored-by: Ece Ozalp <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Ece Ozalp <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…8812) * Update output directory for generative script These files were moved in elastic#98935 but the script has become out of date. * Update ECS fieldmap with ECS 1.12 This fieldmap was missing fields from ECS 1.11+. Notable ommissions were the threat.indicator and threat.enrichments fieldsets. * Remove non-additive mappings changes These are incompatible with the current alerts framework. * Add only necessary threat fields for CTI features This could probably be pared down further, as most of these fields are not critical for CTI features. Additionally, these additions now exceed the limit of 1000 fields and is causing an error in the ruleRegistry bootstrapping. * Remove file.pe threat fields * Remove geo threat indicator fields * Remove all threat.indicator mappings These are not relevant for alerts, which will only have enrichments. * increments index mappings total fields limit to 1200 Co-authored-by: Ece Ozalp <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Decouples template/index management from client & field map.
Note that the write index will now default to
.alerts
, for which index privileges were granted in elastic/elasticsearch#72181, which was recently merged. If the ES version predates that commit, the internal user will not have access to these indices.