Update entities schema to support integrations data#262242
Update entities schema to support integrations data#262242uri-weisman merged 20 commits intoelastic:mainfrom
Conversation
…hub.com/uri-weisman/kibana into feat/entity-store-ecs-relationship-bags
…hub.com/uri-weisman/kibana into feat/entity-store-ecs-relationship-bags
|
Thanks Uri |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
@niros1 The Integration log will look as follows (integrations are less likely to populate |
✅ Actions performedFull review triggered. |
…hub.com/uri-weisman/kibana into feat/entity-store-ecs-relationship-bags
| return `${col} = COALESCE(\`entity.relationships.resolution.resolved_to\`, [""])`; | ||
| } | ||
|
|
||
| return `${col} = COALESCE(\`entity.relationships.${field}.ids\`, [""])`; |
There was a problem hiding this comment.
Is graph ok with having correlations for id only?
There was a problem hiding this comment.
for my understanding that was the format before the change but it was directly under the {field}.
@kfirpeled ?
There was a problem hiding this comment.
The graph works with ids only
In order to correlate between entities and events we pull relevant data per node. And based on the enginemetadata we build the filters using the DSL functions
it is now in review: #261420
|
/ci |
kfirpeled
left a comment
There was a problem hiding this comment.
Checked on existing environment
The graph fails to load due to this change
Tried to "clear all data" from entity store. But now entity store cannot recover due to another issue.
Providing here the error message from the API
Error log 📁
“message”: “verification_exception: Found 7 problems\nline 3:49: Unknown column [entity.relationships.accesses_frequently.ids], did you mean any of [entity.relationships.accesses_frequently, entity.relationships.accesses_infrequently, entity.relationships.owns_inferred, entity.relationships.supervises, entity.relationships.depends_on, entity.relationships.communicates_with, entity.relationships.resolution.resolved_to, entity.relationships.owns]?\nline 4:51: Unknown column [entity.relationships.accesses_infrequently.ids], did you mean any of [entity.relationships.accesses_infrequently, entity.relationships.accesses_frequently, entity.relationships.owns_inferred, entity.relationships.resolution.resolved_to, entity.relationships.communicates_with, entity.relationships.supervises, entity.relationships.depends_on, entity.relationships.resolution.risk.calculated_score, entity.relationships.owns]?\nline 5:47: Unknown column [entity.relationships.communicates_with.ids], did you mean any of [entity.relationships.communicates_with, entity.relationships.owns_inferred, entity.relationships.supervises, entity.relationships.owns, entity.relationships.depends_on, entity.relationships.resolution.resolved_to, entity.relationships.accesses_frequently, entity.relationships.accesses_infrequently, entity.relationships.resolution.risk.calculated_score_norm]?\nline 6:40: Unknown column [entity.relationships.depends_on.ids], did you mean any of [entity.relationships.depends_on, entity.relationships.supervises, entity.relationships.owns, entity.relationships.owns_inferred, entity.relationships.communicates_with, entity.relationships.resolution.resolved_to, entity.relationships.accesses_frequently, entity.relationships.accesses_infrequently, entity.relationships.resolution.risk.calculated_score, entity.relationships.resolution.risk.calculated_level]?\nline 7:34: Unknown column [entity.relationships.owns.ids], did you mean any of [entity.relationships.owns, entity.relationships.owns_inferred, entity.relationships.supervises, entity.relationships.depends_on, entity.relationships.communicates_with, entity.relationships.resolution.resolved_to, entity.relationships.accesses_frequently, entity.relationships.accesses_infrequently, entity.relationships.resolution.risk.calculated_score]?\nline 8:43: Unknown column [entity.relationships.owns_inferred.ids], did you mean any of [entity.relationships.owns_inferred, entity.relationships.owns, entity.relationships.supervises, entity.relationships.accesses_infrequently, entity.relationships.communicates_with, entity.relationships.depends_on, entity.relationships.accesses_frequently, entity.relationships.resolution.resolved_to]?\nline 10:40: Unknown column [entity.relationships.supervises.ids], did you mean any of [entity.relationships.supervises, entity.relationships.depends_on, entity.relationships.communicates_with, entity.relationships.owns_inferred, entity.relationships.owns, entity.relationships.resolution.resolved_to, entity.relationships.accesses_frequently, entity.relationships.accesses_infrequently, entity.relationships.resolution.risk.calculated_score]?”
|
/ci |
|
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
History
|
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24354816960 |
(cherry picked from commit 1270467)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…262856) # Backport This will backport the following commits from `main` to `9.4`: - [Update entities schema to support integrations data (#262242)](#262242) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Uri Weisman","email":"68195305+uri-weisman@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-13T16:33:21Z","message":"Update entities schema to support integrations data (#262242)","sha":"1270467a2b81d39d05db63cf527ae7a6c7322c76","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","ci:build-serverless-image","backport:version","v9.4.0","v9.5.0"],"title":"Update entities schema to support integrations data","number":262242,"url":"https://github.com/elastic/kibana/pull/262242","mergeCommit":{"message":"Update entities schema to support integrations data (#262242)","sha":"1270467a2b81d39d05db63cf527ae7a6c7322c76"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262242","number":262242,"mergeCommit":{"message":"Update entities schema to support integrations data (#262242)","sha":"1270467a2b81d39d05db63cf527ae7a6c7322c76"}}]}] BACKPORT--> Co-authored-by: Uri Weisman <68195305+uri-weisman@users.noreply.github.com>
Tracks the changes needed in communicates_with and accesses maintainers to align with the EntityRelationship schema introduced in elastic#262242. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tracks the changes needed in communicates_with and accesses maintainers to align with the EntityRelationship schema introduced in elastic#262242. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tracks the changes needed in communicates_with and accesses maintainers to align with the EntityRelationship schema introduced in elastic#262242. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Summary
Update entities schema to align with the populated integrations data.
related:
Summary
Refines how relationship fields from logs are materialized on entity documents in the entity store v2 index:
each relationship besides
resolution(e.g. owns, supervises) is now an object of{ raw_identifiers, ids }.We introduce a data structure that allows integrations and entity maintainers to populate as much identifiers as possible, it will provide us the ability, in the future, to run a maintainer on entity store indices and find a correlation to those identifiers.
What changed:
For each supported relationship, we collect identifier fields into
entity.relationships.<relationship>.raw_identifiers.*.entity.relationships.<relationship>.ids- should represent EUIDs (will be updated by entity maintainers).Integration data (source) example:
Stored shape in
.entities.v2.without post processing:Stored shape in
.entities.v2after post-processing:Values in raw_identifiers and ids are aggregated over time per entity-store rules (collect / dedupe), so the index may show more than a single event contributed.