K2Bridge icon indicating copy to clipboard operation
K2Bridge copied to clipboard

Add support for IPV4 range

Open Mimetis opened this issue 2 years ago • 0 comments

Add support for IPV4 Range

Add a dedicated range aggregation for IP typed fields

"aggs": {
    "ip_ranges": {
      "ip_range": {
        "field": "ip",
        "ranges": [
          { "to": "10.0.0.5" },
          { "from": "10.0.0.5" }
        ]
      }
    }
  }

Response:

{
  ...

  "aggregations": {
    "ip_ranges": {
      "buckets": [
        {
          "key": "*-10.0.0.5",
          "to": "10.0.0.5",
          "doc_count": 10
        },
        {
          "key": "10.0.0.5-*",
          "from": "10.0.0.5",
          "doc_count": 260
        }
      ]
    }
  }
}

Reference : IP range aggregation

Useful Kusto functions:

Mimetis avatar Jan 31 '22 08:01 Mimetis