Hi everybody,
I'm facing an issue that drive me crazy.
I have a date field in my log file like :
2018-09-21T14:01:59.271245+02:00
In my logstash filter i tried a lot of pattern and the last one is:
date {
match => ["datetime", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZ", "ISO8601"]
}
But it does not work....
Does anyone have any ideas please ?
Thx for your help.
Hi,
No answer yet...
Nobody have to deal with this kind of format ?
guyboertje
(Guy Boertje)
September 26, 2018, 12:48pm
3
It works for me:
input {
generator {
lines => ['2018-09-21T14:01:59.271245+02:00']
count => 1
}
}
filter {
date {
match => [ "message", "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ"]
}
}
output {
stdout { codec => rubydebug }
}
Result:
{
"sequence" => 0,
"host" => "Elastics-MacBook-Pro.local",
"@version" => "1",
"@timestamp" => 2018-09-21T12:01:59.271Z,
"message" => "2018-09-21T14:01:59.271245+02:00"
}
1 Like
system
(system)
Closed
October 24, 2018, 12:48pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.