Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 08-31-2018 10:02 AM
hi all,
I am trying to insert json elastichsearch use apache nifi
{"submit_date": "2017-09-11 12:28:57.0", "request_type": "change", "origin": "monitoring", "description": "Start Event Process from Zabbix", "timestamp":"2018-08-30 08:16:18.970+0000"}
I insert this to elastichsearch, however, elastichsearch can understand submit_date and timestamp is datetime. So, how to insert time to elastichsearch?
Many thanks
Created 08-31-2018 11:08 AM
In order for the timestamp to work it has to be in the correct format which elasticsearch expects (default ISO 8601).
Here is a good article about timestamp manipulation in nifi:
Then in elasticsearch, you need to create a mapping which tells the index which field is the timestamp:
https://www.elastic.co/guide/en/elasticsearch/hadoop/current/mapping.html#mapping-date
If this answer is helpful, please click ACCEPT to mark your question resolved.
Created 08-31-2018 11:08 AM
In order for the timestamp to work it has to be in the correct format which elasticsearch expects (default ISO 8601).
Here is a good article about timestamp manipulation in nifi:
Then in elasticsearch, you need to create a mapping which tells the index which field is the timestamp:
https://www.elastic.co/guide/en/elasticsearch/hadoop/current/mapping.html#mapping-date
If this answer is helpful, please click ACCEPT to mark your question resolved.
Created 08-31-2018 06:12 PM
Hi @Steven Matision,
Thank you so much for your suggestions. I fixed that issue.
Created 12-03-2018 01:51 PM
Can you please share how?