-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change grok pattern to fetch correct IP from X-Forwarded-For list (#4351
) * Change grok pattern to fetch correct IP from X-Forwarded-For list. * Document change to the nginx module in the changelog. * Add tests for nginx access log.
- Loading branch information
Showing
4 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10.0.0.2, 10.0.0.1, 127.0.0.1 - - [07/Dec/2016:11:05:07 +0100] "GET /ocelot HTTP/1.1" 200 571 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"_index": "filebeat-2016.12.27", | ||
"_type": "log", | ||
"_id": "AVlBCaYsqYg9cc5KQfcT", | ||
"_score": null, | ||
"_source": { | ||
"@timestamp": "2016-12-07T10:05:07.000Z", | ||
"offset": 191, | ||
"nginx": { | ||
"access": { | ||
"referrer": "-", | ||
"response_code": "200", | ||
"remote_ip": "10.0.0.2", | ||
"method": "GET", | ||
"user_name": "-", | ||
"http_version": "1.1", | ||
"body_sent": { | ||
"bytes": "571" | ||
}, | ||
"url": "/ocelot", | ||
"user_agent": { | ||
"major": "49", | ||
"minor": "0", | ||
"os": "Mac OS X 10.12", | ||
"os_minor": "12", | ||
"os_major": "10", | ||
"name": "Firefox", | ||
"os_name": "Mac OS X", | ||
"device": "Other" | ||
} | ||
} | ||
}, | ||
"beat": { | ||
"hostname": "192-168-0-7.rdsnet.ro", | ||
"name": "192-168-0-7.rdsnet.ro", | ||
"version": "6.0.0-alpha1" | ||
}, | ||
"read_timestamp": "2016-12-27T15:52:23.304Z", | ||
"source": "module/nginx/access/test/test.log", | ||
"fields": { | ||
"pipeline_id": "nginx-access-with_plugins", | ||
"source_type": "nginx-access" | ||
}, | ||
"prospector": { | ||
"type": "log" | ||
} | ||
}, | ||
"fields": { | ||
"@timestamp": [ | ||
1481105107000 | ||
] | ||
}, | ||
"sort": [ | ||
1481105107000 | ||
] | ||
} | ||
] |