diff --git a/configs/pilot_log.conf b/configs/pilot_log.conf index 0d24570..38c7746 100644 --- a/configs/pilot_log.conf +++ b/configs/pilot_log.conf @@ -29,13 +29,12 @@ filter { convert => {"PilotTimeStamp" => "string"} } ruby { - code => " - timestamp_source = (event.get('[PilotTimeStamp]')).split(/\s|\./) - event.set('[@timestamp_nanoseconds]', ((Time.at(timestamp_source[0].to_i).getutc).strftime('%Y-%m-%dT%H:%M:%S.') + timestamp_source[1] + 'Z') ) - event.set('[nanoseconds_debug]', ((Time.at(timestamp_source[0].to_i).getutc).strftime('%Y-%m-%dT%H:%M:%S.') + timestamp_source[1] + 'Z') ) - event.set('[@timestamp]', LogStash::Timestamp.new(event.get('[@timestamp_nanoseconds]')) ) - " - } + code => " + timestamp_source = (event.get('[PilotTimeStamp]')).split(/\s|\./) + event.set('[@timestamp_nanoseconds]', ((Time.at(timestamp_source[0].to_i).getutc).strftime('%Y-%m-%dT%H:%M:%S.') + timestamp_source[1] + 'Z') ) + event.set('[nanoseconds_debug]', ((Time.at(timestamp_source[0].to_i).getutc).strftime('%Y-%m-%dT%H:%M:%S.') + timestamp_source[1] + 'Z') ) + event.set('[@timestamp]', LogStash::Timestamp.new(event.get('[@timestamp_nanoseconds]')) ) + " } mutate {