-
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
[Security Solution] New Data Quality dashboard Same family
category
#167480
[Security Solution] New Data Quality dashboard Same family
category
#167480
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
@elasticmachine merge upstream |
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, all looks good, LGTM 🚀 Thank you @andrew-goldstein
eventCategoryWithUnallowedValues, // isEcsCompliant: false, indexInvalidValues.length: 2, isInSameFamily: true, `keyword` and `keyword` are in the same family | ||
hostNameWithTextMapping, // isEcsCompliant: false, indexInvalidValues.length: 0, isInSameFamily: false, `keyword` and `text` are not in the family | ||
sourceIpWithTextMapping, // isEcsCompliant: false, indexInvalidValues.length: 0, isInSameFamily: false, `ip` is not a member of any families | ||
eventCategoryWithWIldcard, // `wildcard` and `keyword` |
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.
super super nit: the I is accidentally capitalized I think WIldcard
=> Wildcard
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.
Investigations codeowner review. Nice work and thanks for the great description as always!
This PR introduces a new `Same family` category to the [Data Quality dashboard](https://www.elastic.co/guide/en/security/current/data-quality-dash.html). Fields with the `same family` tag that were previously counted in the `Incompatible fields` category are now counted in the new `Same family` category, per the annotated screenshot below: ![same_family_before_after_annotated](https://github.com/elastic/kibana/assets/4459398/c7c5d496-03e5-4e06-b837-85f2f16ab885) _Above - Left: previously, fields with the `same family` tag were counted as `Incompatible fields`, Right: in this PR, those fields are counted in the new `Same family` category_ The annotations on the _Right_ side of the screenshot above highlight (in this example): - The total `Incompatible fields` count was reduced - Some patterns, like `auditbeat-*` have significant reductions - The `Incompatible fields` count was reduced by one field - The new `Same family` category has one field - The `agent.type` field moved from the `Incompatible fields` category to the `Same family` category ## Details ### The new `Same family` category Fields with mappings in the same [family](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) have exactly the same search behavior as the type specified by ECS, but may have different space usage or performance characteristics. The color of the `Same family` category is the same as the `Custom fields` category in badges and charts, per the screenshot below: ![same_family_color](https://github.com/elastic/kibana/assets/4459398/259b7e8e-3a52-482e-a419-edf715f8e462) _Above: The `Same family` tab's badge and chart legend color is the same as the `Custom fields` category_ ### The new `Same family` tab This PR introduces a new `Same family` tab, as shown in the screenshot below: ![same_family_tab](https://github.com/elastic/kibana/assets/4459398/f4da99cf-6fa4-4477-8a85-eec9d85c6787) _Above: The new `Same family` tab is selected_ In the screenshot above: - The callout includes a description of fields in the same family (moved from the `Incompatible fields` tab) - The `constant_keyword` text, yellow in previous versions (when it appered in the `Incompatible fields` tab), is blue - Only one action, `Copy to clipboard` is available in the `Same family` tab. The remaining text in this _Details_ section is the markdown copied to the clipboard for the example above: ### auditbeat-custom-index-1 | Result | Index | Docs | Incompatible fields | ILM Phase | Size | |--------|-------|------|---------------------|-----------|------| | ❌ | auditbeat-custom-index-1 | 2 (0.0%) | 3 | `unmanaged` | 13.1KB | ### **Incompatible fields** `3` **Same family** `1` **Custom fields** `4` **ECS compliant fields** `2` **All fields** `10` #### 1 Same family field mapping This field is defined by the Elastic Common Schema (ECS), version 8.6.1, but its mapping type doesn't exactly match. Fields with mappings in the same family have exactly the same search behavior as the type specified by ECS, but may have different space usage or performance characteristics. #### Same family field mappings - auditbeat-custom-index-1 | Field | ECS mapping type (expected) | Index mapping type (actual) | |-------|-----------------------------|-----------------------------| | agent.type | `keyword` | `constant_keyword` `same family` | ## Desk testing 1) Navigate to `Dev Tools` > `Console` 2) Execute the queries below: <details> <summary>Queries to create the `auditbeat-custom-index-1` example in this PR description</summary> ``` DELETE auditbeat-custom-index-1 PUT auditbeat-custom-index-1 PUT auditbeat-custom-index-1/_mapping { "properties": { "@timestamp": { "type": "date" }, "agent.type": { "type": "constant_keyword" }, "event.category": { "type": "constant_keyword" } } } POST auditbeat-custom-index-1/_doc { "@timestamp": "2023-02-06T09:41:49.668Z", "host": { "name": "foo" }, "event": { "category": "an_invalid_category" }, "some.field": "this", "source": { "port": 90210, "ip": "10.1.2.3" } } POST auditbeat-custom-index-1/_doc { "@timestamp": "2023-02-06T09:42:22.123Z", "host": { "name": "bar" }, "event": { "category": "an_invalid_category" }, "some.field": "space", "source": { "port": 867, "ip": "10.9.8.7" } } POST auditbeat-custom-index-1/_doc { "@timestamp": "2023-02-06T09:43:35.456Z", "host": { "name": "baz" }, "event": { "category": "theory" }, "some.field": "for", "source": { "port": 5, "ip": "10.4.6.6" } } POST auditbeat-custom-index-1/_doc { "@timestamp": "2023-02-06T09:44:36.700Z", "host": { "name": "@baz" }, "event": { "category": "malware" }, "some.field": "rent", "source": { "port": 309, "ip": "10.1.1.1" } } ``` </details> 3) Navigate to `Security` > `Dashboards` > `Data Quality` 4) Expand the `auditbeat-custom-index-1` index **Expected results** - The sum of the category badge counts, `3 + 1 + 4 + 2`, equals the total number of fields in the `All fields` [`10`] category: - `Incompatible fields` [`3`] - `Same family` [`1`] - `Custom fields` [`4`] - `ECS compliant fields` [`2`] - The `Incompatible fields` callout title is `3 incompatible fields` - The `Incompatible fields` callout does NOT include a description of same family fields - The `Incompatible fields` tab displays two fields with incompatible mappings - `host.name` (`keyword` vs `text`) - `source.ip` (`ip` vs `text`) - The `Incompatible fields` tab displays one field with incompatible field values - `event.category` (`an_invalid_category`) 5) Click the `Summary` tab **Expected results** - The `Summary` tab is focused - The chart legend includes a `Same family` entry, with a count of `1` - The `Same family` tab's badge color is the same as the `Custom fields` category - The `Same family` chart legend color is the same as the `Custom fields` category 6) Click the `Same family` legend item **Expected results** - The `Same family` tab is focused - One field, `agent.type`, is displayed - The `constant_keyword` Index mapping type is blue - The `same family` badge is yellow 7) Click `Copy to clipboard` **Expected result** - The expected markdown is copied to the clipboard: ``` ### auditbeat-custom-index-1 | Result | Index | Docs | Incompatible fields | ILM Phase | Size | |--------|-------|------|---------------------|-----------|------| | ❌ | auditbeat-custom-index-1 | 2 (0.0%) | 3 | `unmanaged` | 12.9KB | ### **Incompatible fields** `3` **Same family** `1` **Custom fields** `4` **ECS compliant fields** `2` **All fields** `10` #### 1 Same family field mapping This field is defined by the Elastic Common Schema (ECS), version 8.6.1, but its mapping type doesn't exactly match. Fields with mappings in the same family have exactly the same search behavior as the type specified by ECS, but may have different space usage or performance characteristics. #### Same family field mappings - auditbeat-custom-index-1 | Field | ECS mapping type (expected) | Index mapping type (actual) | |-------|-----------------------------|-----------------------------| | agent.type | `keyword` | `constant_keyword` `same family` | ```
60d5f45
to
e60631a
Compare
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
[Security Solution] New Data Quality dashboard
Same family
categoryThis PR introduces a new
Same family
category to the Data Quality dashboard.Fields with the
same family
tag that were previously counted in theIncompatible fields
category are now counted in the newSame family
category, per the annotated screenshot below:Above - Left: previously, fields with the
same family
tag were counted asIncompatible fields
, Right: in this PR, those fields are counted in the newSame family
categoryThe annotations on the Right side of the screenshot above highlight (in this example):
Incompatible fields
count was reducedauditbeat-*
have significant reductionsIncompatible fields
count was reduced by one fieldSame family
category has one fieldagent.type
field moved from theIncompatible fields
category to theSame family
categoryDetails
The new
Same family
categoryFields with mappings in the same family have exactly the same search behavior as the type specified by ECS, but may have different space usage or performance characteristics.
The color of the
Same family
category is the same as theCustom fields
category in badges and charts, per the screenshot below:Above: The
Same family
tab's badge and chart legend color is the same as theCustom fields
categoryThe new
Same family
tabThis PR introduces a new
Same family
tab, as shown in the screenshot below:Above: The new
Same family
tab is selectedIn the screenshot above:
Incompatible fields
tab)constant_keyword
text, yellow in previous versions (when it appered in theIncompatible fields
tab), is blueCopy to clipboard
is available in theSame family
tab. The remaining text in this Details section is the markdown copied to the clipboard for the example above:auditbeat-custom-index-1
unmanaged
Incompatible fields
3
Same family1
Custom fields4
ECS compliant fields2
All fields10
1 Same family field mapping
This field is defined by the Elastic Common Schema (ECS), version 8.6.1, but its mapping type doesn't exactly match.
Fields with mappings in the same family have exactly the same search behavior as the type specified by ECS, but may have different space usage or performance characteristics.
Same family field mappings - auditbeat-custom-index-1
keyword
constant_keyword
same family
Desk testing
Navigate to
Dev Tools
>Console
Execute the queries below:
Queries to create the `auditbeat-custom-index-1` example in this PR description
Navigate to
Security
>Dashboards
>Data Quality
Expand the
auditbeat-custom-index-1
indexExpected results
3 + 1 + 4 + 2
, equals the total number of fields in theAll fields
[10
] category:Incompatible fields
[3
]Same family
[1
]Custom fields
[4
]ECS compliant fields
[2
]Incompatible fields
callout title is3 incompatible fields
Incompatible fields
callout does NOT include a description of same family fieldsIncompatible fields
tab displays two fields with incompatible mappingshost.name
(keyword
vstext
)source.ip
(ip
vstext
)Incompatible fields
tab displays one field with incompatible field valuesevent.category
(an_invalid_category
)Summary
tabExpected results
Summary
tab is focusedSame family
entry, with a count of1
Same family
tab's badge color is the same as theCustom fields
categorySame family
chart legend color is the same as theCustom fields
categorySame family
legend itemExpected results
Same family
tab is focusedagent.type
, is displayedconstant_keyword
Index mapping type is bluesame family
badge is yellowCopy to clipboard
Expected result