Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform geoip on apache error logs as well. #10273

Merged
merged 2 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add support for iis 7.5 log format. {issue}9753[9753] {pull}9967[9967]
- Add service.type field to all Modules. By default the field is set with the module name. It can be overwritten with `service.type` config. {pull}10042[10042]
- Add support for MariaDB in the `slowlog` fileset of `mysql` module. {pull}9731[9731]
- Apache module's error fileset now performs GeoIP lookup, like the access fileset. {pull}10273[10273]
- Elasticsearch module's slowlog now populates `event.duration` (ECS). {pull}9293[9293]
- HAProxy module now populates `event.duration` and `http.response.bytes` (ECS). {pull}10143[10143]
- Teach elasticsearch/audit fileset to parse out some more fields. {issue}10134[10134] {pull}10137[10137]
Expand Down
17 changes: 17 additions & 0 deletions filebeat/module/apache/error/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@
"field": "apache.error.timestamp",
"ignore_failure": true
}
},

{
"grok": {
"field": "source.address",
"ignore_missing": true,
"patterns": [
"^(%{IP:source.ip}|%{HOSTNAME:source.domain})$"
]
}
},
{
"geoip": {
"field": "source.ip",
"target_field": "source.geo",
"ignore_missing": true
}
}
],
"on_failure" : [{
Expand Down
13 changes: 11 additions & 2 deletions filebeat/module/apache/error/test/test.log-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"log.offset": 0,
"message": "File does not exist: /var/www/favicon.ico",
"service.type": "apache",
"source.address": "192.168.33.1"
"source.address": "192.168.33.1",
"source.ip": "192.168.33.1"
},
{
"@timestamp": "2016-12-26T16:15:55.103Z",
Expand Down Expand Up @@ -40,6 +41,14 @@
"process.pid": 35708,
"process.thread.id": 4328636416,
"service.type": "apache",
"source.address": "72.15.99.187"
"source.address": "72.15.99.187",
"source.geo.city_name": "Newnan",
"source.geo.continent_name": "North America",
"source.geo.country_iso_code": "US",
"source.geo.location.lat": 33.3734,
"source.geo.location.lon": -84.8541,
"source.geo.region_iso_code": "US-GA",
"source.geo.region_name": "Georgia",
"source.ip": "72.15.99.187"
}
]