Hi All,
I'm finding difficulty in reading the data like below in elastic search. I already converted the objects into arrays before inserting it into elastic search. Below is my mapping in Elastic search I can see the nested data type getting applied but I'm not able to view it properly in Kibana as everything is treated as text.
Any help plz ?
My Data
"dashboardreport": {
"@name": "dashboardname",
"@version": "2323232323",
"@reportdate": "2018-06-11T18:27:35.051+08:00",
"@description": "",
"source": {
"filters": {
"@summary": "",
}
},
"reportheader": {
"reportdetails": {
"user": "username"
}
},
"data": {
"tasksmonitorsdashlet": {
"@name": "monitors",
"@description": "",
"taskmonitorrecords": {
"@structuretype": "tree",
"taskmonitorrecord": {
"0": {
"@header": "Profile0",
"@status": "scheduled",
"@lastrunresult": "ok",
"@system": "Profile0",
"taskmonitorrecord": {
"@header": "Profile0",
"@status": "scheduled",
"@lastrunresult": "ok",
"@system": "Profile0",
"taskmonitorrecord": {
"@header": "Task1 Clean Up Task",
"@status": "scheduled",
"@lastrunresult": "ok",
"@schedule": "Clean Up",
"@target": "server",
"@system": "local"
}
}
},
"1": {
"@header": "Profile1",
"@status": "text",
"@lastrunresult": "unknown",
"@system": "Profile1",
"taskmonitorrecord": {
"@header": "Import",
"@status": "text",
"@lastrunresult": "unknown",
"@system": "Profile1",
"taskmonitorrecord": {
"@header": "Profile1",
"@status": "text",
"@lastrunresult": "unknown",
"@schedule": "-",
"@target": "server",
"@system": "Profile1"
}
}
},
"2": {
"@header": "Profile2",
"@status": "unknown",
"@lastrunresult": "ok",
"@system": "Profile2",
"taskmonitorrecord": {
"0": {
"@header": "Monitor2",
"@status": "suspended",
"@lastrunresult": "unknown",
"@system": "Profile2",
"taskmonitorrecord": {
"0": {
"@header": "ExecuteMonitor1",
"@status": "suspended",
"@lastrunresult": "unknown",
"@schedule": "Testing",
"@system": "Profile2",
"taskmonitorrecord": {
"@header": "Servertorun",
"@status": "suspended",
"@lastrunresult": "unknown",
"@schedule": "Testing",
"@target": "servertorun",
"@system": "Profile2"
}
},
"1": {
"@header": "ExecuteMonitor1",
"@status": "suspended",
"@lastrunresult": "unknown",
"@schedule": "Testing",
"@system": "Profile2",
"taskmonitorrecord": {
"@header": "Servertorun",
"@status": "suspended",
"@lastrunresult": "unknown",
"@schedule": "Testing",
"@target": "servertorun",
"@system": "Profile2"
}
},
My Mapping
PUT taskmonitor
{
"mappings": {
"doc":{
"properties": {
"dashboardreport":{
"properties": {
"@reportdate":{"type":"date"},
"data":{
"properties":{
"tasksmonitorsdashlet":{
"properties":{
"taskmonitorrecords":{
"properties":{
"taskmonitorrecord":{"type":"nested"}
}
}
}
}
}
}
}
}
}
}
}
}
Discovery tab in Kibana
How i see it in the visualize tab
Any idea on how the mapping should be to have proper aggregation of the data to visualize it as i cannot use wildcards in field names to get all the headers inside arrays
dashboardreport.data.tasksmonitorsdashlet.taskmonitorrecords.taskmonitorrecord.*.
Thanks in Advance