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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -