[o365] Keep numbers as strings through to Elasticsearch#19245
Open
chrisberkhout wants to merge 2 commits into
Open
[o365] Keep numbers as strings through to Elasticsearch#19245chrisberkhout wants to merge 2 commits into
chrisberkhout wants to merge 2 commits into
Conversation
By using `decode_json_string_numbers` instead of `decode_json` in the CEL program, numbers will arrive at the ingest pipeline as strings matching how they were formatted in the API's JSON string. In most cases those values can be passed straight through to Elasticsearch to be indexed as `long` or as `keyword`, so most conversion processing has been removed. There are two types of exceptions to this, handled by a normalization script early in the pipeline: - The `o365audit` input will still provide numbers, so where values need to be compared, we need to ensure we have a consistently formatted string. That is the case for the `RecordType` field. - Some fields arrive from the API as numbers formatted with scientific notation, but they are indexed as `keyword` and should not use scientific notation there. That is the case for the other fields procesed by the normalization script. To use `decode_json_string_numbers`, the minimum agent versions needed to be updated from "^8.18.0 || ^9.0.0" to "^8.19.0 || ^9.1.0".
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
💚 Build Succeeded
|
efd6
reviewed
May 28, 2026
Contributor
efd6
left a comment
There was a problem hiding this comment.
There are some cases here where the fields should be converted to numbers in the ingest pipeline as their semantics are numeric; ….ConditionsMatched.SensitiveInformation.{Confidence,Count,UniqueCount}, o365audit.ExchangeMetaData.{FileSize,RecipientCount} and file.size for example (there are others).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed commit message
Checklist
changelog.ymlfile.Related issues