diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 99809e4bfb7d..de575de4a344 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -67,6 +67,7 @@ https://github.com/elastic/beats/compare/v6.6.0...6.x[Check the HEAD diff] - Fix saved objects in filebeat haproxy dashboard. {pull}9417[9417] - Fixed a memory leak when harvesters are closed. {pull}7820[7820] - Add `convert_timezone` option to Elasticsearch module to convert dates to UTC. {issue}9756[9756] {pull}9761[9761] +- Support IPv6 addresses with zone id in IIS ingest pipeline. {issue}9836[9836] {pull}9869[9869] *Heartbeat* diff --git a/filebeat/module/iis/error/ingest/default.json b/filebeat/module/iis/error/ingest/default.json index 632e31d717f0..af3c470afe7f 100644 --- a/filebeat/module/iis/error/ingest/default.json +++ b/filebeat/module/iis/error/ingest/default.json @@ -28,10 +28,24 @@ "field": "iis.error.time" } }, { - "geoip": { + "grok": { "field": "iis.error.remote_ip", + "patterns": [ + "%{NOZONEIP:iis.error.remote_ip_geoip}" + ], + "pattern_definitions": { + "NOZONEIP": "[^%]*" + } + } + }, { + "geoip": { + "field": "iis.error.remote_ip_geoip", "target_field": "iis.error.geoip" } + }, { + "remove": { + "field": "iis.error.remote_ip_geoip" + } }], "on_failure" : [{ "set" : { diff --git a/filebeat/module/iis/error/test/ipv6_zone_id.log b/filebeat/module/iis/error/test/ipv6_zone_id.log new file mode 100644 index 000000000000..436e133e344f --- /dev/null +++ b/filebeat/module/iis/error/test/ipv6_zone_id.log @@ -0,0 +1,5 @@ +#Software: Microsoft HTTP API 2.0 +#Version: 1.0 +#Date: 2018-12-30 13:48:36 +#Fields: date time c-ip c-port s-ip s-port cs-version cs-method cs-uri streamid sc-status s-siteid s-reason s-queuename +2018-12-30 14:22:07 ::1%0 49958 ::1%0 80 - - - - - - Timer_ConnectionIdle - diff --git a/filebeat/module/iis/error/test/ipv6_zone_id.log-expected.json b/filebeat/module/iis/error/test/ipv6_zone_id.log-expected.json new file mode 100644 index 000000000000..e83699c91cb4 --- /dev/null +++ b/filebeat/module/iis/error/test/ipv6_zone_id.log-expected.json @@ -0,0 +1,17 @@ +[ + { + "@timestamp": "2018-12-30T14:22:07.000Z", + "event.dataset": "iis.error", + "fileset.module": "iis", + "fileset.name": "error", + "iis.error.queue_name": "-", + "iis.error.reason_phrase": "Timer_ConnectionIdle", + "iis.error.remote_ip": "::1%0", + "iis.error.remote_port": "49958", + "iis.error.server_ip": "::1%0", + "iis.error.server_port": "80", + "input.type": "log", + "offset": 195, + "prospector.type": "log" + } +] \ No newline at end of file