Aggregation query in logstash input

Hi! I am trying to get the results of an aggregations query with logstash.

Via dev tools this query works correctly but when passing it to logstash it ingests metadata but nothing related to max, min etc fields I am expecting.

this is my query:

{
  "size" : 0,
  "query" : {
    "bool" : {
      "must" : [
        {
          "term" : {
            "Metric-Type.keyword" : {
              "value" : "service-response-time",
              "boost" : 1.0
            }
          }
        },
        {
          "range" : {
          "@timestamp" : {
            "gt" : "now-7d/d",
            "lte" : "now"
          }
          }
        }
      ],
      "adjust_pure_negative" : true,
      "boost" : 1.0
    }
  },
  "_source" : false,
  "aggregations" : {
    "groupby" : {
      "filters" : {
        "filters" : [
          {
            "match_all" : {
              "boost" : 1.0
            }
          }
        ],
        "other_bucket" : false,
        "other_bucket_key" : "_other_"
      },
      "aggregations" : {
        "stats" : {
          "stats" : {
            "field" : "ValueMetric"
          }
        }
      }
    }
  }
}

and the result:

{
  "took" : 2114,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : null,
    "hits" : [ ]
  },
  "aggregations" : {
    "groupby" : {
      "buckets" : [
        {
          "doc_count" : 4297112,
          "stats" : {
            "count" : 4297112,
            "min" : 0.0,
            "max" : 3042730.0,
            "avg" : 336.3420319873068,
            "sum" : 1.44529938175704E9
          }
        }
      ]
    }
  }
}

and the result indexed by logstash:

Thanks in advanced!

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