Hi @Vortex_SLT
Couple things going on... First and most important Processors are run in order so this would never work because you were trying to do the timestamp before the array was decoded so the date
field was never there in the first place.
2nd and equally important the timestamp processor takes a very special format that you are not using... please look at it closely...
Minor I would use filestream
not log
type going forward, of will be deprecated at some point.
Here is my super simplified version with a file with your sample data
filebeat.inputs:
- type: filestream
id: my-filestream-id
enabled: true
paths:
- /Users/sbrown/workspace/sample-data/discuss/discuss-timestamp.csv
setup.kibana:
output.elasticsearch:
hosts: ["localhost:9200"]
processors:
- decode_csv_fields:
fields:
message: decoded.csv
separator: ","
#ignore_missing: false
#overwrite_keys: true
#trim_leading_space: false
#fail_on_error: true
- extract_array:
field: decoded.csv
mappings:
date3: 0
date2: 1
date: 2
number1: 3
action: 4
message1: 5
ssid: 6
OS_client: 7
IP_client: 8
filename: 9
full_path_name: 10
empty: 11
nas_full_path_file: 12
extention: 13
type: 14
number2: 15
nas_hostname: 16
number3: 17
vnas_hostname: 18
number4: 19
vnas_shared: 20
number5: 21
vnas_shared2: 22
protocol: 23
vers: 24
OS_NAS: 25
log_event: 26
number6: 27
number7: 28
effective_time: 29
SSID_host: 30
ip1: 31
ip2: 32
empty2: 33
username: 34
- timestamp:
field: date
layouts:
- '2006-01-02 15:04:05' <!--- IMPORTANT This is your time format
ignore_failure: false
tag_on_failure: ["_dateparsefailure"]
- drop_fields:
fields: ["message","decoded.csv"]
Resulting Document
{
"_index": "filebeat-7.17.3-2023.05.14-000001",
"_id": "lVWcG4gB_tT2Dm8CeSBz",
"_version": 1,
"_score": 0,
"_source": {
"@timestamp": "2023-05-11T00:00:32.000Z",
"date": "2023-05-11 00:00:32",
"message1": "{\"additionalInformation\":{},\"blocked\":false,\"reason\":null,\"accessControlType\":null,\"userIgnored\":false,\"audited\":true}",
"nas_hostname": "nasnode",
"effective_time": "1683763200",
"ip1": "172.16.0.1",
"vnas_hostname": "hostname01",
"vnas_shared2": "script$",
"SSID_host": "S-1-5-21-xxxx-yyyyy-1714775081-2916883_ip1.ip2.ip3.ip4",
"empty2": "",
"username": "username",
"date3": "1683763230.1440005",
"number1": "144000583",
"action": "READ",
"number5": "535",
"ip2": "10.1.1.1",
"input": {
"type": "filestream"
},
"decoded": {},
"IP_client": "ip1.ip2.ip3.ip4",
"number2": "1",
"number3": "402",
"log_event": "local.cs.fct.file-events.0",
"ecs": {
"version": "1.12.0"
},
"filename": "get_template.ps1",
"full_path_name": "/SBM_scripts/PowershellScripts/vmware/get_template.ps1",
"extention": "ps1",
"protocol": "SMB",
"number7": "2",
"ssid": "S-1-5-21-xxxxx-yyyyyy-1714775081-2916883",
"empty": "",
"number4": "456",
"number6": "5089",
"type": "FILE",
"vnas_shared": "Arg_SBM_scripts",
"vers": "3.0",
"OS_NAS": "ONTAP",
"log": {
"file": {
"path": "/Users/sbrown/workspace/sample-data/discuss/discuss-timestamp.csv"
},
"offset": 1318
},
"host": {
"name": "hyperion"
},
"agent": {
"hostname": "hyperion",
"ephemeral_id": "72968b1e-4a1f-4937-b81a-4d8695786fab",
"id": "55a076f2-0ff2-4274-991f-e352276d5789",
"name": "hyperion",
"type": "filebeat",
"version": "7.17.3"
},
"date2": "2023-05-11",
"OS_client": "WINDOWS",
"nas_full_path_file": "\\\\hostname01\\script$\\PowerShellScripts\\vmware\\get_template.ps1"
}
BTW Depending on how many times you ran this your mapping could be in need over cleaning up.