Skip to content

Commit 3798da2

Browse files
google_workspace: Discard events that are missing the items[] field during the split operation and returned as the root object
The Google Workspace Reports API sometimes does not return the `items[]` array, resulting in the absence of the target field in the `response.split` operation. This leads to the root level object being returned, which causes failures in the ingest pipeline. An issue[1] has been created to resolve the problem with the split[].ignore_empty_value operation. To address this issue as of now, a `drop` processor has been added at the start of the pipeline to ensure that we discard events that are not required. Here is the list of affected data streams: - access_transparency - admin - context_aware_access - device - drive - gcp - group_enterprise - groups - login - rules - saml - token - user_accounts [1] elastic/beats#47699
1 parent 9558a6f commit 3798da2

File tree

37 files changed

+341
-282
lines changed

37 files changed

+341
-282
lines changed

packages/google_workspace/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.47.2"
3+
changes:
4+
- description: Discard events that are missing the `items[]` field during the split operation and are returned as the root object.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/15948
27
- version: "2.47.1"
38
changes:
49
- description: Fix handling of `google_workspace.gmail.message_info.post_delivery_info.interaction.attachment` records.

packages/google_workspace/data_stream/access_transparency/_dev/test/pipeline/test-access-transparency.log-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@
111111
}
112112
}
113113
]
114-
}
114+
}

packages/google_workspace/data_stream/access_transparency/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ processors:
3232
- append:
3333
field: error.message
3434
value: '{{{_ingest.on_failure_message}}}'
35+
- drop:
36+
if: ctx.json?.events == null
37+
description: Discard events that are missing the target during the split operation and are subsequently returned as the root object.
38+
tag: drop_empty_events
3539
- set:
3640
field: event.kind
3741
value: [event]

packages/google_workspace/data_stream/access_transparency/sample_event.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
22
"@timestamp": "2020-10-02T15:00:00.000Z",
33
"agent": {
4-
"ephemeral_id": "e3f2296a-a4a2-4d03-9105-cee5b37c1408",
5-
"id": "c43b6bca-79fe-44a7-b837-da9db4bf7be4",
6-
"name": "docker-fleet-agent",
4+
"ephemeral_id": "e71ef9cb-072e-48d2-9130-96f1d4bce4d3",
5+
"id": "2da80338-c8c6-4300-9470-025fe55de0c1",
6+
"name": "elastic-agent-58418",
77
"type": "filebeat",
8-
"version": "8.13.0"
8+
"version": "8.18.0"
99
},
1010
"data_stream": {
1111
"dataset": "google_workspace.access_transparency",
12-
"namespace": "83912",
12+
"namespace": "21501",
1313
"type": "logs"
1414
},
1515
"ecs": {
16-
"version": "8.11.0"
16+
"version": "8.16.0"
1717
},
1818
"elastic_agent": {
19-
"id": "c43b6bca-79fe-44a7-b837-da9db4bf7be4",
19+
"id": "2da80338-c8c6-4300-9470-025fe55de0c1",
2020
"snapshot": false,
21-
"version": "8.13.0"
21+
"version": "8.18.0"
2222
},
2323
"event": {
2424
"action": "APPLICATION_EVENT",
2525
"agent_id_status": "verified",
26-
"created": "2024-08-01T21:50:19.274Z",
26+
"created": "2025-11-12T09:20:36.555Z",
2727
"dataset": "google_workspace.access_transparency",
2828
"id": "1",
29-
"ingested": "2024-08-01T21:50:31Z",
29+
"ingested": "2025-11-12T09:20:39Z",
3030
"kind": [
3131
"event"
3232
],
@@ -130,4 +130,4 @@
130130
"id": "1",
131131
"name": "foo"
132132
}
133-
}
133+
}

packages/google_workspace/data_stream/admin/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ processors:
3131
- json:
3232
field: event.original
3333
target_field: json
34+
- drop:
35+
if: ctx.json?.events == null
36+
description: Discard events that are missing the target during the split operation and are subsequently returned as the root object.
37+
tag: drop_empty_events
3438
- set:
3539
field: event.kind
3640
value: event

packages/google_workspace/data_stream/admin/sample_event.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"@timestamp": "2022-04-04T15:04:05.000Z",
33
"agent": {
4-
"ephemeral_id": "e64e710c-e02b-4997-bb7e-83b936dd6aa5",
5-
"id": "c43b6bca-79fe-44a7-b837-da9db4bf7be4",
6-
"name": "docker-fleet-agent",
4+
"ephemeral_id": "14b6ad66-8af9-429d-b327-3fee869369e5",
5+
"id": "752f45e8-5f63-4dca-ab63-ec8e8f790d4a",
6+
"name": "elastic-agent-14522",
77
"type": "filebeat",
8-
"version": "8.13.0"
8+
"version": "8.18.0"
99
},
1010
"data_stream": {
1111
"dataset": "google_workspace.admin",
12-
"namespace": "62273",
12+
"namespace": "51420",
1313
"type": "logs"
1414
},
1515
"ecs": {
16-
"version": "8.11.0"
16+
"version": "8.16.0"
1717
},
1818
"elastic_agent": {
19-
"id": "c43b6bca-79fe-44a7-b837-da9db4bf7be4",
19+
"id": "752f45e8-5f63-4dca-ab63-ec8e8f790d4a",
2020
"snapshot": false,
21-
"version": "8.13.0"
21+
"version": "8.18.0"
2222
},
2323
"event": {
2424
"action": "CHANGE_APPLICATION_SETTING",
@@ -27,10 +27,10 @@
2727
"iam",
2828
"configuration"
2929
],
30-
"created": "2024-08-01T21:51:15.529Z",
30+
"created": "2025-11-12T09:21:44.692Z",
3131
"dataset": "google_workspace.admin",
3232
"id": "1",
33-
"ingested": "2024-08-01T21:51:27Z",
33+
"ingested": "2025-11-12T09:21:47Z",
3434
"kind": "event",
3535
"original": "{\"actor\":{\"callerType\":\"USER\",\"email\":\"[email protected]\",\"profileId\":1},\"events\":{\"name\":\"CHANGE_APPLICATION_SETTING\",\"parameters\":[{\"name\":\"APPLICATION_EDITION\",\"value\":\"basic\"},{\"name\":\"APPLICATION_NAME\",\"value\":\"drive\"},{\"name\":\"GROUP_EMAIL\",\"value\":\"[email protected]\"},{\"name\":\"NEW_VALUE\",\"value\":\"new\"},{\"name\":\"OLD_VALUE\",\"value\":\"old\"},{\"name\":\"ORG_UNIT_NAME\",\"value\":\"org\"},{\"name\":\"SETTING_NAME\",\"value\":\"setting\"}],\"type\":\"APPLICATION_SETTINGS\"},\"id\":{\"applicationName\":\"admin\",\"customerId\":\"1\",\"time\":\"2022-04-04T15:04:05Z\",\"uniqueQualifier\":1},\"ipAddress\":\"98.235.162.24\",\"kind\":\"admin#reports#activity\",\"ownerDomain\":\"elastic.com\"}",
3636
"provider": "admin",
@@ -117,4 +117,4 @@
117117
}
118118
}
119119
}
120-
}
120+
}

packages/google_workspace/data_stream/alert/_dev/test/pipeline/test-alert.log-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,4 +1333,4 @@
13331333
]
13341334
}
13351335
]
1336-
}
1336+
}

packages/google_workspace/data_stream/context_aware_access/_dev/test/pipeline/test-context-aware-access.log-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@
105105
}
106106
}
107107
]
108-
}
108+
}

packages/google_workspace/data_stream/context_aware_access/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ processors:
3232
- append:
3333
field: error.message
3434
value: '{{{_ingest.on_failure_message}}}'
35+
- drop:
36+
if: ctx.json?.events == null
37+
description: Discard events that are missing the target during the split operation and are subsequently returned as the root object.
38+
tag: drop_empty_events
3539
- set:
3640
field: event.kind
3741
value: [event]

packages/google_workspace/data_stream/context_aware_access/sample_event.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
22
"@timestamp": "2020-10-02T15:00:00.000Z",
33
"agent": {
4-
"ephemeral_id": "6fde0a21-1448-4531-a5c9-42751772e3a7",
5-
"id": "c43b6bca-79fe-44a7-b837-da9db4bf7be4",
6-
"name": "docker-fleet-agent",
4+
"ephemeral_id": "01101cd7-b942-4061-8dcf-8488f5b64461",
5+
"id": "10bdbb6c-0cff-4af9-866d-64a6bb61e845",
6+
"name": "elastic-agent-67948",
77
"type": "filebeat",
8-
"version": "8.13.0"
8+
"version": "8.18.0"
99
},
1010
"data_stream": {
1111
"dataset": "google_workspace.context_aware_access",
12-
"namespace": "14973",
12+
"namespace": "38010",
1313
"type": "logs"
1414
},
1515
"ecs": {
16-
"version": "8.11.0"
16+
"version": "8.16.0"
1717
},
1818
"elastic_agent": {
19-
"id": "c43b6bca-79fe-44a7-b837-da9db4bf7be4",
19+
"id": "10bdbb6c-0cff-4af9-866d-64a6bb61e845",
2020
"snapshot": false,
21-
"version": "8.13.0"
21+
"version": "8.18.0"
2222
},
2323
"event": {
2424
"action": "APPLICATION_EVENT",
2525
"agent_id_status": "verified",
26-
"created": "2024-08-01T21:53:36.823Z",
26+
"created": "2025-11-12T09:23:14.570Z",
2727
"dataset": "google_workspace.context_aware_access",
2828
"id": "1",
29-
"ingested": "2024-08-01T21:53:48Z",
29+
"ingested": "2025-11-12T09:23:17Z",
3030
"kind": [
3131
"event"
3232
],
@@ -124,4 +124,4 @@
124124
"id": "1",
125125
"name": "foo"
126126
}
127-
}
127+
}

0 commit comments

Comments
 (0)