From 0436f885b853012a70675412cf9b689d1a90361e Mon Sep 17 00:00:00 2001 From: weslambert Date: Tue, 31 Jan 2023 08:04:49 -0500 Subject: [PATCH] Set values for '@timestamp' and 'event.ingested' --- salt/elasticsearch/files/ingest/import.wel | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/salt/elasticsearch/files/ingest/import.wel b/salt/elasticsearch/files/ingest/import.wel index e75098f8f..d03cd34e4 100644 --- a/salt/elasticsearch/files/ingest/import.wel +++ b/salt/elasticsearch/files/ingest/import.wel @@ -1,10 +1,11 @@ { "description" : "import.wel", "processors" : [ - { "remove": { "field": ["event.created","timestamp", "winlog.event_data.UtcTime", "event_record_id"], "ignore_failure": true } }, - { "pipeline": { "if": "ctx.winlog?.channel == 'Microsoft-Windows-Sysmon/Operational'", "name": "sysmon" } }, - { "pipeline": { "if": "ctx.winlog?.channel != 'Microsoft-Windows-Sysmon/Operational'", "name":"win.eventlogs" } }, - { "dissect": { "field": "log.file.name", "pattern" : "/tmp/%{import.id}.evtx" } }, - { "pipeline": { "name": "common" } } + { "set": { "field": "event.ingested", "value": "{{ @timestamp }}" } }, + { "set" : { "field" : "@timestamp", "value" : "{{ event.created }}" } }, + { "remove": { "field": [ "event_record_id", "event.created" , "timestamp" , "winlog.event_data.UtcTime" ], "ignore_failure": true } }, + { "pipeline": { "if": "ctx.winlog?.channel == 'Microsoft-Windows-Sysmon/Operational'", "name": "sysmon" } }, + { "pipeline": { "if": "ctx.winlog?.channel != 'Microsoft-Windows-Sysmon/Operational'", "name":"win.eventlogs" } }, + { "pipeline": { "name": "common" } } ] -} \ No newline at end of file +}