Nginx module: use first not private IP address as remote_ip#4417
Merged
exekias merged 1 commit intoelastic:masterfrom Jun 2, 2017
Merged
Nginx module: use first not private IP address as remote_ip#4417exekias merged 1 commit intoelastic:masterfrom
exekias merged 1 commit intoelastic:masterfrom
Conversation
13a3b52 to
038ae1e
Compare
exekias
reviewed
May 30, 2017
Contributor
There was a problem hiding this comment.
please check this, there is a bad merge and tests are failing
038ae1e to
c1eadae
Compare
dedemorton
reviewed
May 30, 2017
filebeat/docs/fields.asciidoc
Outdated
Contributor
There was a problem hiding this comment.
So if there are no public IP addresses in remote_ip_list, this field contains a private IP address, right? If that's true, we should be a bit more direct here and say something like:
The first public IP address from the remote_ip_list array. If no public IP addresses are present, this field contains the first private IP address from the remote_ip_list array.
c1eadae to
5e8f61e
Compare
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.
5e8f61e to
9011ed7
Compare
Contributor
Author
|
Comments addressed. |
tsg
added a commit
to tsg/beats
that referenced
this pull request
Jul 19, 2017
…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
pushed a commit
that referenced
this pull request
Jul 19, 2017
…ess as remote_ip (#4703) * Nginx module: use first not private IP address as remote_ip (#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 #4322. (cherry picked from commit a2c162f)
Merged
8 tasks
redcinelli
added a commit
to elastic/integrations
that referenced
this pull request
Aug 29, 2022
#3251) * Update: Add support for x_forwarded_for headers in apaches access logs This Pr is heavily inpired by the work done in [this PR](elastic/beats#4417) It is adressing [this ER](elastic/enhancements#14402). `Grok` pattern has been updated to match logs starting with a list of IP adresses and store all those ip in `apache.access.remote_ip`. This pattern is heavily insipred by the one in the nginx integration. I also decided to fill a new field `network.forwarded_ip` as it seems to be the perfect fit. Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_listwhich is an array, and usesa Painless script to automatically select the first non-private
IP for the
remote_ipfield, which is the field on which GeoIP isapplied.
Fixes #4322.