Skip to content
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

[google_workspace} Fix pagination bug that skipped events when more than one page is present #3140

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/google_workspace/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.3.4"
changes:
- description: Fix pagination to prevent skipped events when more than one page is present.
type: bugfix
link: https://github.com/elastic/integrations/pull/3140
- version: "1.3.3"
changes:
- description: Add documentation for multi-fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ request.timeout: {{http_client_timeout}}
request.transforms:
- set:
target: url.params.startTime
value: "[[.cursor.last_execution_datetime]]"
value: '[[if eq .last_response.page 0]][[.cursor.last_execution_datetime]][[else]][[.last_response.url.params.Get "startTime"]][[end]]'
default: '[[formatDate (now (parseDuration "-{{initial_interval}}"))]]'
response.split:
target: body.items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ request.timeout: {{http_client_timeout}}
request.transforms:
- set:
target: url.params.startTime
value: "[[.cursor.last_execution_datetime]]"
value: '[[if eq .last_response.page 0]][[.cursor.last_execution_datetime]][[else]][[.last_response.url.params.Get "startTime"]][[end]]'
default: '[[formatDate (now (parseDuration "-{{initial_interval}}"))]]'
response.split:
target: body.items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ request.timeout: {{http_client_timeout}}
request.transforms:
- set:
target: url.params.startTime
value: "[[.cursor.last_execution_datetime]]"
value: '[[if eq .last_response.page 0]][[.cursor.last_execution_datetime]][[else]][[.last_response.url.params.Get "startTime"]][[end]]'
default: '[[formatDate (now (parseDuration "-{{initial_interval}}"))]]'
response.split:
target: body.items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ request.timeout: {{http_client_timeout}}
request.transforms:
- set:
target: url.params.startTime
value: "[[.cursor.last_execution_datetime]]"
value: '[[if eq .last_response.page 0]][[.cursor.last_execution_datetime]][[else]][[.last_response.url.params.Get "startTime"]][[end]]'
default: '[[formatDate (now (parseDuration "-{{initial_interval}}"))]]'
response.split:
target: body.items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ request.timeout: {{http_client_timeout}}
request.transforms:
- set:
target: url.params.startTime
value: "[[.cursor.last_execution_datetime]]"
value: '[[if eq .last_response.page 0]][[.cursor.last_execution_datetime]][[else]][[.last_response.url.params.Get "startTime"]][[end]]'
default: '[[formatDate (now (parseDuration "-{{initial_interval}}"))]]'
response.split:
target: body.items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ request.timeout: {{http_client_timeout}}
request.transforms:
- set:
target: url.params.startTime
value: "[[.cursor.last_execution_datetime]]"
value: '[[if eq .last_response.page 0]][[.cursor.last_execution_datetime]][[else]][[.last_response.url.params.Get "startTime"]][[end]]'
default: '[[formatDate (now (parseDuration "-{{initial_interval}}"))]]'
response.split:
target: body.items
Expand Down
2 changes: 1 addition & 1 deletion packages/google_workspace/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: google_workspace
title: Google Workspace Audit Reports
version: 1.3.3
version: 1.3.4
release: ga
description: Collect audit reports from Google Workspaces with Elastic Agent.
type: integration
Expand Down