Bucketed query in Kibana

Hello All,

We built a query from topbeat data by applying buckets and scripts. I wanted a build a logic by comparing the avg cpu, avg memory and avg fs utilization and visualize the final result in Kibana. ''

I have run this query in sense and got an output. How to visualize this in Kibana. Kindly help

GET topbeat-2016.06.20/_search
{
"size": 0,
"aggs":{
"bucket1":{
"terms":{
"script":"'bucket1'"
},
"aggs": {
"bucket2":{
"terms": {
"script":"'bucket2'"
}
},
"avg_cpu":{
"avg":{
"field":"cpu.user_p"
}
},
"avg_fs":{
"avg":{
"field":"fs.used_p"
}
},
"avg_mem":{
"avg":{
"field":"mem.used_p"
}
},
"system_health":{
"bucket_script": {
"buckets_path":{
"avgcpu":"avg_cpu",
"avgmem":"avg_mem",
"avgfs":"avg_fs"
},
"script": "if(avgcpu > 0.8 || avgmem > 0.6 || avgfs > 0.5){2}else if(avgcpu > 0.6 || avgmem > 0.4 || avgfs > 0.3){1}else{0}"
}
}
}
}
}
}

Pipeline aggregations are not supported in Kibana yet (https://github.com/elastic/kibana/issues/4584). So it is currently not possible to visualize your query in Kibana.

Thanks Shaunak for confirming.