Issue importing JSON using script
Closed this issue · 3 comments
Nosphorus commented
Hi, I followed your tutorial on Smart Factory, however I can't get the dataString to divide the fields into individual fields.
Example payload:
{
"device":"368640",
"deviceType":"Sigfox-Tracker",
"version":3,
"time":"Tue Aug 21 2018 02:33:05 GMT+0000 (UTC)",
"rssi":"-120.00",
"battery":3.28,
"temp":20.87,
"soil":1915,
"xAxis":59,
"yAxis":-38,
"zAxis":994
}
Here is the data visualised in Kibana. The topmost is using your scrip, and the second is if I manually add data to make the mapping for the index. Any help would be greatly appreciated.
mattfield11 commented
You would need to either use an ingest pipeline (see the elasticsearch
docs) or modify the python script to parse out the json directly.
…On Tue, 21 Aug 2018, 19:34 Nosphorus, ***@***.***> wrote:
Hi, I followed your tutorial on Smart Factory, however I can't get the
dataString to divide the fields into individual fields.
Example payload:
{
"device":"368640",
"deviceType":"Sigfox-Tracker",
"version":3,
"time":"Tue Aug 21 2018 02:33:05 GMT+0000 (UTC)",
"rssi":"-120.00",
"battery":3.28,
"temp":20.87,
"soil":1915,
"xAxis":59,
"yAxis":-38,
"zAxis":994
}
[image: untitled-1]
<https://user-images.githubusercontent.com/10903193/44418609-c3851880-a570-11e8-99ff-f4d3d57536df.jpg>
Here is the data visualised in Kibana. The topmost is using your scrip,
and the second is if I manually add data to make the mapping for the index.
Any help would be greatly appreciated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AJv-hZ7fYsWer-QUaAKcfeOVkYrq-1KTks5uTES9gaJpZM4WGQfB>
.
Nosphorus commented
I managed to correct it after modifying the script and adding an ingest pipeline. Had to change the date back to epoch for Kibana to recognise it as a timestamp. Thank you for the script though Matt, I wouldn't of made it this far without you.
mattfield11 commented
Great .glad you could get it working!
…On Wed, 22 Aug 2018, 12:23 Nosphorus, ***@***.***> wrote:
I managed to correct it after modifying the script and adding an ingest
pipeline. Had to change the date back to epoch for Kibana to recognise it
as a timestamp. Thank you for the script though Matt, I wouldn't of made it
this far without you.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJv-hbS-28BAfVPeEb6x-O8dYVZVenvLks5uTTEUgaJpZM4WGQfB>
.