Scripted fields for calculation


#1

Hello there,

i have a Problem with an Analysis. I want to calculate the Availability of Machines over the selected timerange in Kibana.

The Problam is:

  • The two variables i need are sum of the variables of the several datasets.
  • The two variables i need have the same name, but in different types of the Index

Does somebody know a solution, where i can dynamically calculate the Availability?

Is there a solution with scripted fields?

Thanks to all.


(Alexander Reelsen) #2

Hey,

so is this an issue of writing a useful aggregation first? If so, it might make sense to share two documents/mapping/indices as a minimal example, so folks can take a look if it is possible to join the data the way you want.

---Alex


#3

Hey,

ok, i have two types of documents.

Doc 1 (Stops):
{
type: "Stops"
duration: x
]

Doc 2 (Shifts)
{
type:"Shifts"
duration y
}

and now i do a metric aggregation over a period of time, where i calculate the sum of duration of the Stops and the sum of duration of the Shifts (two types). In Kibana i show it on metric visualizations. Now i want to calculate (sum of duration stops - sum of duration shifts) / (sum of duration shifts). I need to do it dynamically in Kibana. Is there any possibility to implement it there?


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.