Recently I've been working on customizing beat with bash to generate the json data that logstash needed instead of to write own beat with go.
Cuz I'm not the go expert. I'm good to implement customizing beat with script.
I didn't add field @timestamp for original json raw data gernated from script,after the json raw data sent to logstash, logstash addes some metadata to this raw json data (like @version ,@timestamp).
The problem is that, I want to add the field @timestamp to original json raw data ,not want to let logstash or elasticsearch to add or modify @timestamp.
otherwise the metrics we collected that script triggered is not precise at that time.
By the way, how linux "date" command generate the correct the unix timestamp based iso8601?
(I think this timestamp is Accurate to milliseconds and end up with Three decimal places)
Any suggestions or comments are grateful?