Error while extracting timestamp

Hello Community,

I have been encountering an error while trying to parse the timestamps in the log below,

sudeep_singh_0-1751889281018.png

To parse the above timesamps, I've attached my code and the error,

date {
    match => ["created", "UNIX_MS", "UNIX"]
    target => "event.idm.read_only_udm.metadata.collected_timestamp"
    # on_error => "no_match"
  }
 
Snip of error:
sudeep_singh_1-1751889329570.png

As per my understanding, the timestamp is in float and not matching with the date functions like "UNIX" or "UNIX_MS"

Can someone please help m to figure out this problem?

Thanks,
Sudeep

Solved Solved
0 1 71
1 ACCEPTED SOLUTION

Hello sudeep,

I tried converting the timestamp to string and it's parsing.

Here's the code snipped for your reference:

filter {
mutate {
replace => {
"event.idm.read_only_udm.metadata.event_type" => "GENERIC_EVENT"
}
}
json {
source => "message"
array_function => "split_columns"
on_error => "zerror.not_json1"
}
mutate {
convert => {
"created" => "string"
}
}
date {
match => ["created", "UNIX_MS"]
target => "event.idm.read_only_udm.metadata.collected_timestamp"
# on_error => "no_match"
}
mutate {
merge => {
"@output" => "event"
}
}
}

vishnu_manu_0-1751906321753.png

 



Hope that helps!

View solution in original post

1 REPLY 1

Hello sudeep,

I tried converting the timestamp to string and it's parsing.

Here's the code snipped for your reference:

filter {
mutate {
replace => {
"event.idm.read_only_udm.metadata.event_type" => "GENERIC_EVENT"
}
}
json {
source => "message"
array_function => "split_columns"
on_error => "zerror.not_json1"
}
mutate {
convert => {
"created" => "string"
}
}
date {
match => ["created", "UNIX_MS"]
target => "event.idm.read_only_udm.metadata.collected_timestamp"
# on_error => "no_match"
}
mutate {
merge => {
"@output" => "event"
}
}
}

vishnu_manu_0-1751906321753.png

 



Hope that helps!