Kibana painless script -
i having kibana 5.3.
i have field "type" , want make: count(type==1) / count(type==2)
how can make chart value? have tried scripted fields it's not working @ all.
{ "script": { "lang": "painless", "inline": "int totalsuccess = 0; int totalfailure = 0; (int = 0; < doc['_type'].length; ++i) { if(doc['_type'][i] =='call-end') {totalsuccess += 1;} if(doc['_type'][i] == 'call-attempt'){totalfailure +=1;}} return totalfailure/totalsuccess ;" } }
Comments
Post a Comment