Issue in Scripted query result inside the scripted fields in elastic search and scripted query filters according to duration and conditions

(yashraj) #1


I am using ELK version 6.1.1 with in my Ubuntu 16.04 LTS. The client side of this for gathering analytics by graph is already present in angular 4 framework in which , all the analytical graph visualization are coming from embedded Iframes and also in duration changing features (controlled by time duration string inside the iframe graphs and changing according onto the duration will be change like a day, a week, a month and so on).

Problem Statement:-
I need to create visualization inside the dashboards so that, i want to create new field on ES side by doing some mathematical calculations at run time with available log lines containing fields and than use it for aggregations for making graphs of visualization. And also i want to get first value of another field available in multiple log lines so that, i should be able to get top first value of that field in ascending order according to duration selected at client side for that dashboard containing visualization. So i am using scripted fields to create such field, where i can do mathematical calculations to generate new filed for run time calculations and corresponding to this, one of that operands needs to come by getting top first value of that another field according to selected duration and for fulfilling the second constraint , i want to use scripted queries feature of ES. So the problem is that, i need to get that top first value with consistency and robustness same as the log lines and the there defined fields so that it can be got in a way as like logs are coming on ES i.e. whenever duration would change , the top first value should come inside the code of that scripted field for the aggregations of that graph of visualization.
So i want to know that how can i get scripted query result in another filed for that calculation because i might needed to call that scripted query for getting output but i want to use automatic way for that run time calculations every time according to duration selected. And i am needed to know that how can i get this top first field value according to time duration selected by scripted query.

Please give the suitable solutions for all conditions ASAP.

Thanks and waiting for the solutions.