forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filebeat] Add -expected files by default (elastic#12041)
So far expected files in Filebeat tests were only generated and compared when a file exists. This changes to create a generated for all example logs. This will add a few more files to the repository but I think there the benefits outweight the costs as it means the modules are tested in more detail. Also minor changes will be detected easier.
- Loading branch information
Showing
33 changed files
with
29,516 additions
and
15 deletions.
There are no files selected for viewing
118 changes: 118 additions & 0 deletions
118
filebeat/module/apache/access/test/darwin-2.4.23.log-expected.json
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,118 @@ | ||
[ | ||
{ | ||
"@timestamp": "2016-12-26T14:16:28.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.response.body.bytes": 45, | ||
"http.response.status_code": 200, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 0, | ||
"service.type": "apache", | ||
"source.address": "::1", | ||
"source.ip": "::1", | ||
"url.original": "/", | ||
"user.name": "-" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T14:16:29.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.response.body.bytes": 209, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 61, | ||
"service.type": "apache", | ||
"source.address": "::1", | ||
"source.ip": "::1", | ||
"url.original": "/favicon.ico", | ||
"user.name": "-" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T14:16:48.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.response.status_code": 408, | ||
"input.type": "log", | ||
"log.offset": 134, | ||
"service.type": "apache", | ||
"source.address": "::1", | ||
"source.ip": "::1", | ||
"user.name": "-" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:23:35.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.response.body.bytes": 45, | ||
"http.response.status_code": 200, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 181, | ||
"service.type": "apache", | ||
"source.address": "77.179.66.156", | ||
"source.geo.continent_name": "Europe", | ||
"source.geo.country_iso_code": "DE", | ||
"source.geo.location.lat": 51.2993, | ||
"source.geo.location.lon": 9.491, | ||
"source.ip": "77.179.66.156", | ||
"url.original": "/", | ||
"user.name": "-" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:23:41.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.response.body.bytes": 206, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 252, | ||
"service.type": "apache", | ||
"source.address": "77.179.66.156", | ||
"source.geo.continent_name": "Europe", | ||
"source.geo.country_iso_code": "DE", | ||
"source.geo.location.lat": 51.2993, | ||
"source.geo.location.lon": 9.491, | ||
"source.ip": "77.179.66.156", | ||
"url.original": "/notfound", | ||
"user.name": "-" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:23:45.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.response.body.bytes": 201, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 332, | ||
"service.type": "apache", | ||
"source.address": "77.179.66.156", | ||
"source.geo.continent_name": "Europe", | ||
"source.geo.country_iso_code": "DE", | ||
"source.geo.location.lat": 51.2993, | ||
"source.geo.location.lon": 9.491, | ||
"source.ip": "77.179.66.156", | ||
"url.original": "/hmm", | ||
"user.name": "-" | ||
} | ||
] |
233 changes: 233 additions & 0 deletions
233
filebeat/module/apache/access/test/ubuntu-2.2.22.log-expected.json
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,233 @@ | ||
[ | ||
{ | ||
"@timestamp": "2016-12-26T16:18:09.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 491, | ||
"http.response.status_code": 200, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 0, | ||
"service.type": "apache", | ||
"source.address": "127.0.0.1", | ||
"source.ip": "127.0.0.1", | ||
"url.original": "/", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Wget", | ||
"user_agent.original": "Wget/1.13.4 (linux-gnu)", | ||
"user_agent.version": "1.13.4" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:00.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 484, | ||
"http.response.status_code": 200, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 98, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Chrome", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36", | ||
"user_agent.os.full": "Mac OS X 10.12.0", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12.0", | ||
"user_agent.version": "54.0.2840" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:00.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "http://192.168.33.72/", | ||
"http.response.body.bytes": 504, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 296, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/favicon.ico", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Chrome", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36", | ||
"user_agent.os.full": "Mac OS X 10.12.0", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12.0", | ||
"user_agent.version": "54.0.2840" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:08.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 484, | ||
"http.response.status_code": 200, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 525, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Firefox", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0", | ||
"user_agent.os.full": "Mac OS X 10.12", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12", | ||
"user_agent.version": "50.0" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:08.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 504, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 685, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/favicon.ico", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Firefox", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0", | ||
"user_agent.os.full": "Mac OS X 10.12", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12", | ||
"user_agent.version": "50.0" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:08.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 504, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 856, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/favicon.ico", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Firefox", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0", | ||
"user_agent.os.full": "Mac OS X 10.12", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12", | ||
"user_agent.version": "50.0" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:10.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 498, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 1027, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/test", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Firefox", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0", | ||
"user_agent.os.full": "Mac OS X 10.12", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12", | ||
"user_agent.version": "50.0" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:13.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 499, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 1191, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/hello", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Firefox", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0", | ||
"user_agent.os.full": "Mac OS X 10.12", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12", | ||
"user_agent.version": "50.0" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:22:17.000Z", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.access", | ||
"event.module": "apache", | ||
"fileset.name": "access", | ||
"http.request.method": "GET", | ||
"http.request.referrer": "-", | ||
"http.response.body.bytes": 499, | ||
"http.response.status_code": 404, | ||
"http.version": "1.1", | ||
"input.type": "log", | ||
"log.offset": 1356, | ||
"service.type": "apache", | ||
"source.address": "192.168.33.1", | ||
"source.ip": "192.168.33.1", | ||
"url.original": "/crap", | ||
"user.name": "-", | ||
"user_agent.device.name": "Other", | ||
"user_agent.name": "Firefox", | ||
"user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0", | ||
"user_agent.os.full": "Mac OS X 10.12", | ||
"user_agent.os.name": "Mac OS X", | ||
"user_agent.os.version": "10.12", | ||
"user_agent.version": "50.0" | ||
} | ||
] |
30 changes: 30 additions & 0 deletions
30
filebeat/module/apache/error/test/darwin-2.4.23.log-expected.json
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,30 @@ | ||
[ | ||
{ | ||
"@timestamp": "2016-12-26T16:15:55.103Z", | ||
"apache.error.module": "mpm_prefork", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.error", | ||
"event.module": "apache", | ||
"fileset.name": "error", | ||
"input.type": "log", | ||
"log.level": "notice", | ||
"log.offset": 0, | ||
"message": "AH00163: Apache/2.4.23 (Unix) configured -- resuming normal operations", | ||
"process.pid": 11379, | ||
"service.type": "apache" | ||
}, | ||
{ | ||
"@timestamp": "2016-12-26T16:15:55.103Z", | ||
"apache.error.module": "core", | ||
"ecs.version": "1.0.0", | ||
"event.dataset": "apache.error", | ||
"event.module": "apache", | ||
"fileset.name": "error", | ||
"input.type": "log", | ||
"log.level": "notice", | ||
"log.offset": 138, | ||
"message": "AH00094: Command line: '/usr/local/Cellar/httpd24/2.4.23_2/bin/httpd'", | ||
"process.pid": 11379, | ||
"service.type": "apache" | ||
} | ||
] |
Oops, something went wrong.