Skip to content

Commit

Permalink
akamai: fix signs of from and to GET parameters (elastic#6384)
Browse files Browse the repository at this point in the history
The initial_interval manifest option is an unsigned interval,
represented as a postive time offset, but the url.params.from template
was adding it unaltered to the now time, resulting in a "from" in the
future. Similarly, the url.params.to template was calculating now less
one minute. Fix the "from" sign and don't offset the "to" time.
  • Loading branch information
efd6 authored and agithomas committed Jun 5, 2023
1 parent 8e14976 commit 6401efd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/akamai/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.9.1"
changes:
- description: Fix sign of initial interval for start time offset calculation.
type: bugfix
link: https://github.com/elastic/integrations/pull/6384
- version: "2.9.0"
changes:
- description: Update package to ECS 8.8.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ request.transforms:
- set:
target: url.params.from
value: >-
[[ if not (index .cursor "last_offset") ]][[ (now (parseDuration "{{initial_interval}}")).Unix ]][[ end ]]
[[ if not (index .cursor "last_offset") ]][[ (now (parseDuration "-{{initial_interval}}")).Unix ]][[ end ]]
- set:
target: url.params.to
value: >-
[[ if not (index .cursor "last_offset") ]][[ (now (parseDuration "-1m")).Unix ]][[ end ]]
[[ if not (index .cursor "last_offset") ]][[ (now).Unix ]][[ end ]]
- set:
target: url.params.offset
value: >-
Expand Down
2 changes: 1 addition & 1 deletion packages/akamai/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: akamai
title: Akamai
version: "2.9.0"
version: "2.9.1"
description: Collect logs from Akamai with Elastic Agent.
type: integration
format_version: 2.7.0
Expand Down

0 comments on commit 6401efd

Please sign in to comment.