Skip to content

Cherry-pick #4417 to 5.x: Nginx module: use first not private IP address as remote_ip#4703

Merged
exekias merged 2 commits intoelastic:5.xfrom
tsg:backport_4417_5.x
Jul 19, 2017
Merged

Cherry-pick #4417 to 5.x: Nginx module: use first not private IP address as remote_ip#4703
exekias merged 2 commits intoelastic:5.xfrom
tsg:backport_4417_5.x

Conversation

@tsg
Copy link
Copy Markdown
Contributor

@tsg tsg commented Jul 19, 2017

Cherry-pick of PR #4417 to 5.x branch. Original message:

A common customization to the nginx logs is to add the contents
of the X-Forwarded-For header in front of the remote IPs. This
typically results in a list of remote IPs.

This adds a new field remote_ip_list which is an array, and uses
a Painless script to automatically select the first non-private
IP for the remote_ip field, which is the field on which GeoIP is
applied.

Fixes #4322.

…4417)

A common customization to the nginx logs is to add the contents
of the X-Forwarded-For header in front of the remote IPs. This
typically results in a list of remote IPs.

This adds a new field `remote_ip_list` which is an array, and uses
a Painless script to automatically select the first non-private
IP for the `remote_ip` field, which is the field on which GeoIP is
applied.

Fixes elastic#4322.
(cherry picked from commit a2c162f)
@exekias exekias merged commit 5a3831c into elastic:5.x Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants