Basically the converto-json function in powershell converts it to value": "/Date(1481722713595)/", which is valid json but not a valid date for logstash or elastic to use. I have written some code to alleviate this but it is basically loop and very expensive. I did not know if there was a way for logstash to manipulate the date and put it back into the same variable.
I guess I would need logstash to look at the field and determine the correct date.
the regex pattern match would be something like this '("\/\w*\W\d*\W\/")'
This converts the date back in powershell I have to test for negative dates as well. #negative test
$mydate = {"/Date(-366235200000)/"}|convertfrom-json
$mydate1 ="$($mydate.toshortdatestring())"
$mydate1
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.