How to divide two fields in kibana


(Nitanshu) #1

I have the following query and it shows error
"type": "x_content_parse_exception",
"reason": "[4:8] [sum] unknown field [RESULT], parser not found"
I am using Kibana , elasticsearch and logstash
My query is

GET ipvidentixkpi/_search
{"aggs": {
"sum_1": {
"sum": {
"RESULT": "FAILURE"
}
},
"sum_2": {
"sum": {
"SERVICE_PROVIDER": "IDENTIX"
}
},
"division": {
"bucket_script": {
"buckets_path": {
"my_var1": "sum_1",
"my_var2": "sum_2"
},
"script": "params.my_var1 / params.my_var2"
}
}
}
}
Plz help