Math calculation on different fields? How to?


#1

Hi,

our system which we monitor with elastic stack is queuing messages in different parts of the application.

Unfortunately they are stored in different fields. THere are some example field names where the values are stored:

  • PerfLogValue
  • amqcount

Is it possible to let elasticsearch do some math and sum both fields up?
I want elasticsearch to calculate PerfLogValue + amqcount.

How can this be done?
Is there also a way to do so in kibana?

Thanks a lot, Andreas


(Mark Walkom) #2

Scripted fields should be able to do this for you, but they can be expensive at scale.


#3

thanks for the fast reply.

scripted fields are always calculated, even if I don't visualize them, right?

Is there another way to run the calculation only when I need them?
E.g. by requiring the calculation within the query from elasticsearch or from within kibana as json input?

I would like to keep the performance impact as low as possible


(Mark Walkom) #4

Not that I am aware of/can recall.


(system) #5

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