-
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.
Teach
elasticsearch/audit
fileset to handle timestamps correctly (#…
…15942) (#15962) * Add samples from ES 7.1.1 audit log * When JSON logs contain @timestamp and TZ is detected, use detected TZ * Add CHANGELOG entry * Remove redundant guard * Revert unrelated change * s/teach/improve/ in changelog entry
- Loading branch information
1 parent
1446025
commit 70b9c5d
Showing
6 changed files
with
113 additions
and
10 deletions.
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
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,3 @@ | ||
{"@timestamp":"2019-09-05T14:02:37,921", "node.id":"UwRu4mReRtyJO1-FWAPvIQ", "event.type":"transport", "event.action":"authentication_success", "user.name":"_system", "origin.type":"local_node", "origin.address":"127.0.0.1:9300", "realm":"__fallback", "request.id":"474ZciqtQteOhjLO3OdZIw", "action":"indices:monitor/stats", "request.name":"IndicesStatsRequest"} | ||
{"@timestamp":"2020-01-29T09:41:10,856", "node.id":"DJKjhISiTzy-JY5nCU8h3Q", "event.type":"transport", "event.action":"access_granted", "user.name":"_xpack_security", "user.realm":"__attach", "user.roles":["superuser"], "origin.type":"local_node", "origin.address":"127.0.0.1:9300", "request.id":"I9bQCw28Qfe4HWtIJHgoAg", "action":"cluster:admin/xpack/security/realm/cache/clear", "request.name":"ClearRealmCacheRequest"} | ||
{"@timestamp":"2020-01-29T09:41:10,859", "node.id":"DJKjhISiTzy-JY5nCU8h3Q", "event.type":"transport", "event.action":"access_granted", "user.name":"_xpack_security", "user.realm":"__attach", "user.roles":["superuser"], "origin.type":"local_node", "origin.address":"127.0.0.1:9300", "request.id":"I9bQCw28Qfe4HWtIJHgoAg", "action":"cluster:admin/xpack/security/realm/cache/clear[n]", "request.name":"Node"} |
77 changes: 77 additions & 0 deletions
77
filebeat/module/elasticsearch/audit/test/test-audit-711.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,77 @@ | ||
[ | ||
{ | ||
"@timestamp": "2019-09-05T16:02:37.921Z", | ||
"elasticsearch.audit.action": "indices:monitor/stats", | ||
"elasticsearch.audit.layer": "transport", | ||
"elasticsearch.audit.origin.type": "local_node", | ||
"elasticsearch.audit.realm": "__fallback", | ||
"elasticsearch.audit.request.id": "474ZciqtQteOhjLO3OdZIw", | ||
"elasticsearch.audit.request.name": "IndicesStatsRequest", | ||
"elasticsearch.node.id": "UwRu4mReRtyJO1-FWAPvIQ", | ||
"event.action": "authentication_success", | ||
"event.dataset": "elasticsearch.audit", | ||
"event.module": "elasticsearch", | ||
"event.timezone": "-02:00", | ||
"fileset.name": "audit", | ||
"input.type": "log", | ||
"log.offset": 0, | ||
"message": "{\"@timestamp\":\"2019-09-05T14:02:37,921\", \"node.id\":\"UwRu4mReRtyJO1-FWAPvIQ\", \"event.type\":\"transport\", \"event.action\":\"authentication_success\", \"user.name\":\"_system\", \"origin.type\":\"local_node\", \"origin.address\":\"127.0.0.1:9300\", \"realm\":\"__fallback\", \"request.id\":\"474ZciqtQteOhjLO3OdZIw\", \"action\":\"indices:monitor/stats\", \"request.name\":\"IndicesStatsRequest\"}", | ||
"service.type": "elasticsearch", | ||
"source.address": "127.0.0.1:9300", | ||
"source.ip": "127.0.0.1", | ||
"source.port": 9300, | ||
"user.name": "_system" | ||
}, | ||
{ | ||
"@timestamp": "2020-01-29T11:41:10.856Z", | ||
"elasticsearch.audit.action": "cluster:admin/xpack/security/realm/cache/clear", | ||
"elasticsearch.audit.layer": "transport", | ||
"elasticsearch.audit.origin.type": "local_node", | ||
"elasticsearch.audit.request.id": "I9bQCw28Qfe4HWtIJHgoAg", | ||
"elasticsearch.audit.request.name": "ClearRealmCacheRequest", | ||
"elasticsearch.audit.user.realm": "__attach", | ||
"elasticsearch.audit.user.roles": [ | ||
"superuser" | ||
], | ||
"elasticsearch.node.id": "DJKjhISiTzy-JY5nCU8h3Q", | ||
"event.action": "access_granted", | ||
"event.dataset": "elasticsearch.audit", | ||
"event.module": "elasticsearch", | ||
"event.timezone": "-02:00", | ||
"fileset.name": "audit", | ||
"input.type": "log", | ||
"log.offset": 363, | ||
"message": "{\"@timestamp\":\"2020-01-29T09:41:10,856\", \"node.id\":\"DJKjhISiTzy-JY5nCU8h3Q\", \"event.type\":\"transport\", \"event.action\":\"access_granted\", \"user.name\":\"_xpack_security\", \"user.realm\":\"__attach\", \"user.roles\":[\"superuser\"], \"origin.type\":\"local_node\", \"origin.address\":\"127.0.0.1:9300\", \"request.id\":\"I9bQCw28Qfe4HWtIJHgoAg\", \"action\":\"cluster:admin/xpack/security/realm/cache/clear\", \"request.name\":\"ClearRealmCacheRequest\"}", | ||
"service.type": "elasticsearch", | ||
"source.address": "127.0.0.1:9300", | ||
"source.ip": "127.0.0.1", | ||
"source.port": 9300, | ||
"user.name": "_xpack_security" | ||
}, | ||
{ | ||
"@timestamp": "2020-01-29T11:41:10.859Z", | ||
"elasticsearch.audit.action": "cluster:admin/xpack/security/realm/cache/clear[n]", | ||
"elasticsearch.audit.layer": "transport", | ||
"elasticsearch.audit.origin.type": "local_node", | ||
"elasticsearch.audit.request.id": "I9bQCw28Qfe4HWtIJHgoAg", | ||
"elasticsearch.audit.request.name": "Node", | ||
"elasticsearch.audit.user.realm": "__attach", | ||
"elasticsearch.audit.user.roles": [ | ||
"superuser" | ||
], | ||
"elasticsearch.node.id": "DJKjhISiTzy-JY5nCU8h3Q", | ||
"event.action": "access_granted", | ||
"event.dataset": "elasticsearch.audit", | ||
"event.module": "elasticsearch", | ||
"event.timezone": "-02:00", | ||
"fileset.name": "audit", | ||
"input.type": "log", | ||
"log.offset": 785, | ||
"message": "{\"@timestamp\":\"2020-01-29T09:41:10,859\", \"node.id\":\"DJKjhISiTzy-JY5nCU8h3Q\", \"event.type\":\"transport\", \"event.action\":\"access_granted\", \"user.name\":\"_xpack_security\", \"user.realm\":\"__attach\", \"user.roles\":[\"superuser\"], \"origin.type\":\"local_node\", \"origin.address\":\"127.0.0.1:9300\", \"request.id\":\"I9bQCw28Qfe4HWtIJHgoAg\", \"action\":\"cluster:admin/xpack/security/realm/cache/clear[n]\", \"request.name\":\"Node\"}", | ||
"service.type": "elasticsearch", | ||
"source.address": "127.0.0.1:9300", | ||
"source.ip": "127.0.0.1", | ||
"source.port": 9300, | ||
"user.name": "_xpack_security" | ||
} | ||
] |
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