Skip to content

Commit d9f7ac6

Browse files
w0rk3randrewkroh
andauthored
[BugFix] O365 - Fix OperationCount Mapping (#15796)
* [BugFix] O365 - Fix OperationCount Mapping * Apply code suggestions * Update packages/o365/changelog.yml Co-authored-by: Andrew Kroh <[email protected]> * Update default.yml * Update packages/o365/data_stream/audit/elasticsearch/ingest_pipeline/default.yml Co-authored-by: Andrew Kroh <[email protected]> --------- Co-authored-by: Andrew Kroh <[email protected]>
1 parent 88917b6 commit d9f7ac6

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

packages/o365/changelog.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.33.1"
3+
changes:
4+
- description: Reverts earlier `o365.audit.OperationCount` mapping change to ensure that the field remains a long.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15796
27
- version: "2.33.0"
38
changes:
49
- description: >-
@@ -24,7 +29,7 @@
2429
changes:
2530
- description: Improve documentation.
2631
type: enhancement
27-
link: https://github.com/elastic/integrations/pull/1
32+
link: https://github.com/elastic/integrations/pull/15660
2833
- version: "2.30.0"
2934
changes:
3035
- description: >-

packages/o365/data_stream/audit/_dev/test/pipeline/test-exchange-access-event.json-expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"MailboxGuid": "8b46a639-c47f-4634-b90c-2accecd337e3",
110110
"MailboxOwnerSid": "S-1-5-21-1234567890-123456789-1234567890-12345678",
111111
"MailboxOwnerUPN": "[email protected]",
112-
"OperationCount": "6",
112+
"OperationCount": 6,
113113
"OperationProperties": [
114114
{
115115
"Name": "AttachmentAccessType",
@@ -716,7 +716,7 @@
716716
"MailboxGuid": "eeeeeeee-aaaa-1234-bbbb-123456789012",
717717
"MailboxOwnerSid": "S-1-5-21-1234567890-1234567890-123456789012-88888888",
718718
"MailboxOwnerUPN": "[email protected]",
719-
"OperationCount": "6",
719+
"OperationCount": 6,
720720
"OperationProperties": [
721721
{
722722
"Name": "MailAccessType",

packages/o365/data_stream/audit/elasticsearch/ingest_pipeline/default.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,13 +1414,11 @@ processors:
14141414
}
14151415
- script:
14161416
tag: convert_operationcount
1417-
description: Ensure that OperationCount is not rendered with e-notation or other numeric
1417+
description: Ensure that OperationCount is rendered as a long
14181418
if: ctx.o365audit?.OperationCount != null
14191419
source: |-
14201420
if (ctx.o365audit.OperationCount instanceof Number) {
1421-
ctx.o365audit.OperationCount = ((long)ctx.o365audit.OperationCount).toString();
1422-
} else {
1423-
ctx.o365audit.OperationCount = ctx.o365audit.OperationCount.toString();
1421+
ctx.o365audit.OperationCount = ((Number)ctx.o365audit.OperationCount).longValue();
14241422
}
14251423
- append:
14261424
field: email.message_id

packages/o365/data_stream/audit/fields/fields.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@
464464
- name: Operation
465465
type: keyword
466466
- name: OperationCount
467-
type: keyword
467+
type: long
468468
- name: OperationId
469469
type: keyword
470470
- name: OperationProperties

packages/o365/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ An example event for `audit` looks as following:
428428
| o365.audit.ObjectId | | keyword |
429429
| o365.audit.ObjectType | | keyword |
430430
| o365.audit.Operation | | keyword |
431-
| o365.audit.OperationCount | | keyword |
431+
| o365.audit.OperationCount | | long |
432432
| o365.audit.OperationId | | keyword |
433433
| o365.audit.OperationProperties | | object |
434434
| o365.audit.OrganizationId | | keyword |

packages/o365/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: o365
22
title: Microsoft Office 365
3-
version: "2.33.0"
3+
version: "2.33.1"
44
description: Collect logs from Microsoft Office 365 with Elastic Agent.
55
type: integration
66
format_version: "3.2.3"

0 commit comments

Comments
 (0)