Hello,
I am getting the error "failed to parse [logdate]","reason"=>"failed to parse [logdate]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: "2018-Jan-16T11:07:42" is malformed at "-Jan-16T11:07:42""}.
In the stdout window, I can see that it is recognizing/parsing the @timestamp, but not ingesting into elasticsearch.
Sample output from STDOUT
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: "year" => "2018",
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: "message" => [
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: [0] "[Thu Jan 11 2018 17:43:52 GMT-0700 (MST)] INFO UUID1002 - responded to ssshivam - Hit (1) for Gold or (2) for platinum",
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: [1] "Hit (1) for Gold or (2) for platinum"
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: ],
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: "type" => "jarvis",
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: "path" => "/logs/jarvis/hubot_jarvis-160118-1116.log",
Jan 25 15:01:17 lpdpoc14.phx.aexp.com logstash[38670]: "@timestamp" => 2018-01-12T00:43:52.000Z,
---Sample text from log file---
[Thu Jan 11 2018 18:51:54 GMT-0700 (MST)] INFO UUID1006 - responded to username - I can list top 10 processes by CPU or Memory consumption. Hit [1] for CPU , [2] for Memory
--Connfig--1---in logstash--
grok {
match => {
message => '\[%{DAY:day} %{MONTH:month} %{MONTHDAY:mday} %{YEAR:year} %{TIME:time} GMT-0700 \(MST\)\] INFO UUID%{NUMBER:conversation_id} - (%{WORD:response} to )?%{WORD:user_id} (%{WORD:question} me )?- %{GREEDYDATA:message}'
}
}
mutate { add_field => {"logdate" => "%{year}-%{month}-%{mday} %{time}"}
}
----Config-2------in logstash-- tried with these settings also
grok {
match => {
message => '\[%{DAY:day} %{MONTH:month} %{MONTHDAY:mday} %{YEAR:year} %{TIME:time} GMT-0700 \(MST\)\] INFO UUID%{NUMBER:conversation_id} - (%{WORD:response} to )?%{WORD:user_id} (%{WORD:question} me )?- %{GREEDYDATA:message}'
}
}
mutate { add_field => {"logdate" => "%{month}-%{mday}-%{year} %{time}"}
}
------Below is the date filter----
date {
match => [ "logdate", "YYYY-MM-dd HH:mm:ss.SSS","YYYY-MMM-dd HH:mm:ss","EEE MMM dd YYYY HH:mm:ss 'GMT-0700 (MST)'", "EEE MMM dd yyyy HH:mm:ss ZZZ","ISO8601","yyyy-MM-dd'T'HH:mm:ss.SSSSSS","MMM-dd-YYYY HH:mm:ss" ]
target => "@timestamp"
}