Hello,
I'm having an issue with date parsing multiple dates in one file. is there anyway to do multiple message matches / GROKS depending on what the log line is?
For instance:
USING this GROK
match => { "message" => "%{DATE:date} -? ?%{TIME:time} %{LOGLEVEL:severity} ?[%{NOTSPACE:package}]\ ?%{GREEDYDATA:message}"
}
So that would match a log line of this type
06/09/2016 - 16:22:42.178 PM [INFO ] [com.arrowstream.shipmentstatus.ShipmentStatusReceiveFM] Scanning directory \ASPD-EBIFS01\Extol\Inbound...
But...
In that same log file there are other lines written with different date formats. So I know I would need a different grok. is it possible to say her if the line matches this grok then do this?
sample other lines in same log file
2016-04-21 13:46:23,946 INFO [org.apache.shiro.realm.AuthorizingRealm] No cache or cacheManager properties have been set. Authorization cache cannot be obtained.
06/10/2016 - 11:42:41.704 AM [INFO ] [com.arrowstream.shipmentstatus.ShipmentStatusReceiveFM] Scanning directory \ASPD-EBIFS01\Extol\Inbound...
As you can see the data is ultimately written in three different ways:
year-day-month HH:mm:ss,SSS
year-month-day HH:mm:ss,SSS
day/month-year HH:mm:ss,SSS
So it there anyway I can account for this?