Skip to content

Commit

Permalink
[8.12](backport #37116) [m365_defender] Fix log data stream cursor an…
Browse files Browse the repository at this point in the history
…d query (#37745)

* [m365_defender] Fix log data stream cursor and query  (#37116)

* Fix m365_defender cursor value and query building.

* Add PR number

* Remove formatDate function

* Fix changelog

---------

Co-authored-by: Bharat Pasupula <123897612+bhapas@users.noreply.github.com>
(cherry picked from commit aa72a3f)

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: Marc Guasch <marc-gr@users.noreply.github.com>
  • Loading branch information
mergify[bot] and marc-gr authored Jan 29, 2024
1 parent 51f5cb4 commit cf731e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Fix Filebeat Cisco module with missing escape character {issue}36325[36325] {pull}36326[36326]
- Added a fix for Crowdstrike pipeline handling process arrays {pull}36496[36496]
- Fix TCP/UDP metric queue length parsing base. {pull}37714[37714]
- Fix m365_defender cursor value and query building. {pull}37116[37116]

*Heartbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ request.transforms:
value: "MdatpPartner-Elastic-Filebeat/1.0.0"
- set:
target: "url.params.$filter"
value: 'lastUpdateTime gt [[formatDate .cursor.lastUpdateTime "2006-01-02T15:04:05.9999999Z"]]'
value: 'lastUpdateTime gt [[.cursor.lastUpdateTime]]'
default: 'lastUpdateTime gt [[formatDate (now (parseDuration "-55m")) "2006-01-02T15:04:05.9999999Z"]]'

response.split:
target: body.value
ignore_empty_value: true
Expand All @@ -31,10 +30,10 @@ response.split:
split:
target: body.alerts.entities
keep_parent: true

cursor:
lastUpdateTime:
value: "[[.last_response.body.lastUpdateTime]]"
value: "[[.last_event.lastUpdateTime]]"
ignore_empty_value: true

{{ else if eq .input "file" }}

Expand Down

0 comments on commit cf731e6

Please sign in to comment.