Timestamp conversion pattern on ingest_node

Hi,
In an ingest node pipeline, im converting the log event into a timestamp.
The log event is in this format: 2019-09-11 10:12:11,145
and the conversion via ingest_node is removing the TIME: 2019-09-11T00:00:00.000Z

I tried "format": iSO861 (it throws an error) and yyyy-MM-dd hh:mm:ss,SSS, like that (using simulate API)

{
 "pipeline": {
   "description": "Parsing LOg4Net Logs",
   "processors": [
     {
       "grok": {
         "field": "message",
         "patterns":["%{TIMESTAMP_ISO8601:logtimestamp};%{DATA:SystemName}"]
       }
     },
     {
      "date" : {
        "field" : "logtimestamp",
        "formats" : ["yyyy-MM-dd hh:mm:ss,SSS"]
      }
    }
   ]
 },
 "docs": [
   {
     "_index": "log4net",
     "_type": "message",
     "_score": 1,
     "_source": {
       "message": "2019-09-11 10:12:11,145;ApplicationName"
     }
   }
 ]
}

Result is:
"_source": {
"logtimestamp": "2019-09-11 10:12:11,145",
"@timestamp": "2019-09-11T00:00:00.000Z",
"SystemName": "",
"message": "2019-09-11 10:12:11,145;ApplicationName"

Sorry my bad,
yyyy-MM-dd HH:mm:ss,SSS should do the trick :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.