Hello, I can't record the current date from the log string in the @timestamp field and convert the time field from the string type to the date type. Can you tell me what I'm doing wrong? My configuration is shown below..
if [type] == "bl" {
grok {
patterns_dir => ["/etc/logstash/patterns"]
match => { "message" => "%{FIRESEC_BL_GENERAL}" }
}
date {
match => ["time", "dd MMM yyyy hh:mm:ss.SSS"]
target => "time"
}
date {
match => ["time", "dd MMM yyyy hh:mm:ss.SSS"]
target => "@timestamp"
}
}
My patterns:
FIRESEC_TIME %{MONTHDAY} %{MONTH} %{YEAR} %{TIME}
FIRESEC_BL_GENERAL %{FIRESEC_TIME:time} [(?<module_name>(?:[^-]+|-(?:$|[^\d])))-(?<module_version>[^]])][(?<alert_source>[^]])] (?<alert_type>[^ ]) (?<alert_message>[^\n^.])