How to get or extract Count of fields using logstash

Hello,
I want to extract or get count of fields using logstash. Below is the query i have written but when i put this query in logstash it does not work

this query does not give me the count. pls help

GET /abc-int-aplha*/_search?pretty
{"size": 0,
"query": {
    "range": {
      "@timestamp": {
        "gte": "now-15m"
      }
    }},
  "aggs": {
    "2": {
      "terms": {
        "field": "measurement",
        "order": {
          "_count": "asc"
        },
        "size": 200
      },
      "aggs": {
        "3": {
          "terms": {
            "field": "e2e.status",
            "order": {
              "_count": "desc"
            },
            "size": 20
          }
        }
      }
    }
  }}

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