Skip to content

Commit

Permalink
Add an aggregator for IPv4 and IPv6 subnets (#82410)
Browse files Browse the repository at this point in the history
Parameters accepted by the aggregator include:

* prefix_length (integer, required): defines the network size of the subnet mask;
* is_ipv6 (boolean, optional, default: false): defines whether the prefix applies to IPv6 (true) or IPv4 (false) IP addresses;
* min_doc_count (integer, optional, default: 1): defines the minimum number of documents for a bucket to be returned in the results;
* append_prefix_length (boolean, optional, default: false): defines if the prefix length is appended to the IP address key when returning results;
* keyed (boolean, optional, default: false): defines whether the result is returned keyed or as an array of buckets;

Each bucket returned by the aggregator represents a different subnet. IPv4 subnets also include a netmask field set to the subnet mask value (i.e. "255.255.0.0" for a /16 subnet).

Related to: #57964 and elastic/kibana#68424
  • Loading branch information
salvatore-campagna committed Jan 28, 2022
1 parent 6dba334 commit 9de75c2
Show file tree
Hide file tree
Showing 15 changed files with 3,075 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/82410.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 82410
summary: Add an aggregator for IPv4 and IPv6 subnets
area: Aggregations
type: enhancement
issues: []
2 changes: 2 additions & 0 deletions docs/reference/aggregations/bucket.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ include::bucket/global-aggregation.asciidoc[]

include::bucket/histogram-aggregation.asciidoc[]

include::bucket/ipprefix-aggregation.asciidoc[]

include::bucket/iprange-aggregation.asciidoc[]

include::bucket/missing-aggregation.asciidoc[]
Expand Down

0 comments on commit 9de75c2

Please sign in to comment.