Reply
Highlighted
BVC
New Contributor
Posts: 2
Registered: ‎01-19-2017
Accepted Solution

Morphilines add some minutes in convertTimestamp

Hi, i have a problem with morphilines and solr, i can send events logs with flume and morphilines to store in solr for later processing but this event log have a time stamp with this format "2017-05-17T15:20:00.848528" in morphilines, i added the convertTimestamp fragment:

 

{
convertTimestamp {
field : fechaError
inputFormats : ["yyyy-MM-dd'T'HH:mm:ss.SSS", "yyyy-MM-dd"]
inputTimezone : America/Los_Angeles
outputFormat : "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
outputTimezone : UTC
}
}



This work correctly for store data in correct format for Solr but this convertion add some minutes (8 - 15) to real date

 

Real date : 2017-05-17T08:46:45.552554
After convertion : 2017-05-17T08:55:57.554Z

 

I using this expression for extract the value:

 

 

%{TIMESTAMP_ISO8601:fechaError}

I try change de inputTimezone and outputTimezone and the inputLocale and outputLocale puting the same value but the result is esqueals or worst

 

I appreciate your help in advance

BVC
New Contributor
Posts: 2
Registered: ‎01-19-2017

Re: Morphilines add some minutes in convertTimestamp

At last I solved my problem, apparently morphilines have a problem with high precision dates, they simply eliminate the accuracy after seconds and worked correctly:

 

{
convertTimestamp {
field : fechaError
inputFormats : ["yyyy-MM-dd'T'HH:mm:ss.SSS", "yyyy-MM-dd"]
inputTimezone : America/Bogota
outputFormat : "yyyy-MM-dd'T'HH:mm:ss'Z'"
outputTimezone : UTC
}
}

Announcements