Calculating a metric based off a pipeline aggregation


(Michael Craig) #1

Hello,

We want to keep track of the record maximum daily searches. I have a metric visualization that does this with max bucket agg but I want to add extra functionality and I am finding it difficult.

Is it possible for me to calculate another metric (response time) which is restricted to the day of the max daily searches?

Some ideas, maybe this JSON 'keys' field would be useful (found in the elasticsearch response body)

{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 13,
    "successful": 13,
    "failed": 0
  },
  "hits": {
    "total": 6492,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "1": {
      "value": 526727,
      "keys": [
        "2017-09-26T00:00:00.000+01:00"
      ]
    },

   .....
}

To be concrete, I want to calculate the average response time for 2017/09/26 and for this metric to update (by changing the day it is querying documents from) if the maximum daily search changes.

Thanks.


(system) #2

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