diff --git a/packages/cisco_duo/changelog.yml b/packages/cisco_duo/changelog.yml index ca9e3e6e044..8faa13d1d59 100644 --- a/packages/cisco_duo/changelog.yml +++ b/packages/cisco_duo/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "2.3.2" + changes: + - description: Avoid obsolete cursor data in activity, telephony_v2. + type: bugfix + link: https://github.com/elastic/integrations/pull/12492 - version: "2.3.1" changes: - description: Fix broken links in Security Service integrations packages. diff --git a/packages/cisco_duo/data_stream/activity/agent/stream/cel.yml.hbs b/packages/cisco_duo/data_stream/activity/agent/stream/cel.yml.hbs index c03f4a1ed33..3032f9a00bc 100644 --- a/packages/cisco_duo/data_stream/activity/agent/stream/cel.yml.hbs +++ b/packages/cisco_duo/data_stream/activity/agent/stream/cel.yml.hbs @@ -38,7 +38,7 @@ program: | : state.with({ "mintime": string(1000 * int( - state.?cursor.last_published.optMap(t, + state.?cursor.last_response_ts.optMap(t, t.parse_time(time_layout.RFC3339Nano) ).orValue( now - duration(state.initial_interval) @@ -109,19 +109,19 @@ program: | : optional.none(), "cursor": { - ?"last_published": (has(body.?response.items) && size(body.response.items) > 0) ? + ?"last_response_ts": (has(body.?response.items) && size(body.response.items) > 0) ? optional.of( body.response.items.map(i, i.ts).max().as(last_timestamp, - !has(dyn(state).?cursor.last_published) ? + !has(dyn(state).?cursor.last_response_ts) ? last_timestamp - : (last_timestamp < dyn(state).cursor.last_published) ? - dyn(state).cursor.last_published + : (last_timestamp < dyn(state).cursor.last_response_ts) ? + dyn(state).cursor.last_response_ts : last_timestamp ) ) : - dyn(state).?cursor.last_published, + dyn(state).?cursor.last_response_ts, } } : diff --git a/packages/cisco_duo/data_stream/telephony_v2/agent/stream/cel.yml.hbs b/packages/cisco_duo/data_stream/telephony_v2/agent/stream/cel.yml.hbs index 553258248b6..2a500588e21 100644 --- a/packages/cisco_duo/data_stream/telephony_v2/agent/stream/cel.yml.hbs +++ b/packages/cisco_duo/data_stream/telephony_v2/agent/stream/cel.yml.hbs @@ -38,7 +38,7 @@ program: | : state.with({ "mintime": string(1000 * int( - state.?cursor.last_published.optMap(t, + state.?cursor.last_response_ts.optMap(t, t.parse_time(time_layout.RFC3339Nano) ).orValue( now - duration(state.initial_interval) @@ -106,19 +106,19 @@ program: | : optional.none(), "cursor": { - ?"last_published": (has(body.?response.items) && size(body.response.items) > 0) ? + ?"last_response_ts": (has(body.?response.items) && size(body.response.items) > 0) ? optional.of( body.response.items.map(i, i.ts).max().as(last_timestamp, - !has(dyn(state).?cursor.last_published) ? + !has(dyn(state).?cursor.last_response_ts) ? last_timestamp - : (last_timestamp < dyn(state).cursor.last_published) ? - dyn(state).cursor.last_published + : (last_timestamp < dyn(state).cursor.last_response_ts) ? + dyn(state).cursor.last_response_ts : last_timestamp ) ) : - dyn(state).?cursor.last_published, + dyn(state).?cursor.last_response_ts, } } : diff --git a/packages/cisco_duo/manifest.yml b/packages/cisco_duo/manifest.yml index 7c24246d93a..e9c4ad95793 100644 --- a/packages/cisco_duo/manifest.yml +++ b/packages/cisco_duo/manifest.yml @@ -1,7 +1,7 @@ format_version: "3.0.2" name: cisco_duo title: Cisco Duo -version: "2.3.1" +version: "2.3.2" description: Collect logs from Cisco Duo with Elastic Agent. type: integration categories: