Skip to content

Commit

Permalink
[m365_defender] Fix log data stream cursor and query (#37116)
Browse files Browse the repository at this point in the history
* Fix m365_defender cursor value and query building.

* Add PR number

* Remove formatDate function

* Fix changelog

---------

Co-authored-by: Bharat Pasupula <[email protected]>
  • Loading branch information
marc-gr and bhapas authored Jan 25, 2024
1 parent 77abcf3 commit aa72a3f
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 @@ -74,6 +74,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Fix handling of Juniper SRX structured data when there is no leading junos element. {issue}36270[36270] {pull}36308[36308]
- 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 m365_defender cursor value and query building. {pull}37116[37116]
- Fix TCP/UDP metric queue length parsing base. {pull}37714[37714]

*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 aa72a3f

Please sign in to comment.