Skip to content

Commit

Permalink
Fix pagination bug that skipped events when more than one page is pre…
Browse files Browse the repository at this point in the history
…sent. (#3140)
  • Loading branch information
marc-gr authored Apr 21, 2022
1 parent d2b6e24 commit f7e7d87
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
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

0 comments on commit f7e7d87

Please sign in to comment.