Hello,
Using the following query I found the Handle ID for ID 4660:
{job="windows-security"}
| json
| event_id =~ "4660"
| line_format "{{ .event_data }}"
| regexp "<Data Name='HandleId'>(?P<HandleId>[^<]*)</Data>"
| HandleId_4660 = ""
| line_format "Handle ID 4660 is: {{.HandleId}}"
I want to set the value of HandleId
to HandleId_4660
. I wrote the following query, but it didn’t work:
{job="windows-security"}
| json
| event_id =~ "4660"
| line_format "{{ .event_data }}"
| regexp "<Data Name='HandleId'>(?P<HandleId>[^<]*)</Data>"
| HandleId_4660 = "{{ .HandleId }}"
| line_format "Handle ID 4660 is: {{ .HandleId_4660 }}"
Why?
Thank you.