I want a visualization on a field of nested object. Currently Kibana sum bucket agg showing document count for particular status.
Indexed Data:
{
"episodeId": "E1",
"data": {
"errorDetails": [
{
"ticketId": "E1T1",
"errorStatus": "Open"
},
{
"ticketId": "E1T2",
"errorStatus": "Closed"
},
{
"ticketId": "E1T3",
"errorStatus": "Closed"
},
{
"ticketId": "E1T4",
"errorStatus": "Open"
}
]
}
}
{
"episodeId": "E2",
"data": {
"errorDetails": [
{
"ticketId": "E2T1",
"errorStatus": "Open"
},
{
"ticketId": "E2T2",
"errorStatus": "Open"
},
{
"ticketId": "E2T3",
"errorStatus": "Open"
}
]
}
}
{
"episodeId": "E3",
"data": {
"errorDetails": [
{
"ticketId": "E3T1",
"errorStatus": "Closed"
},
{
"ticketId": "E3T2",
"errorStatus": "Closed"
},
{
"ticketId": "E3T3",
"errorStatus": "Closed"
}
]
}
}
Kibana Visualization:
Metric Aggregation -> Sum Bucket -> filed: data.errorDetails.errorStatus.keyword
Buckets -> Terms -> field: data.errorDetails.errorStatus.keyword
Obtained Output DataTable:
|status |Count|
|Closed|3 |
|Open |3 |
Required Output DataTable:
|status |Count|
|Closed|5 |
|Open |5 |
How can we achieve this in Kibana?