-
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.
Handle ECS-compatible slowlogs emitted by ES 8.0.0+
- Loading branch information
1 parent
65a9fef
commit 7f23586
Showing
6 changed files
with
171 additions
and
4 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
3 changes: 2 additions & 1 deletion
3
filebeat/module/elasticsearch/slowlog/test/es_indexing_slowlog.800.log
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
{"@timestamp":"2020-04-15T12:35:21.209Z", "log.level":"TRACE", "id":"lcbWfXEBen4m75r-L0Gf", "message":"[test_index/XouPROkuRtybzItor6Ln2w]", "source":"{\\\"field\\\":123}", "took":"19.6ms", "took_millis":"19" , "service.name":"ES_ECS","process.thread.name":"elasticsearch[integTest-0][write][T#2]","log.logger":"index.indexing.slowlog.index.XouPROkuRtybzItor6Ln2w","type":"index_indexing_slowlog","cluster.uuid":"a0P-i2H5R9-tJqwtF7BL0A","node.id":"FFMF7MVISuCWZMtxGmcGhg","node.name":"integTest-0","cluster.name":"integTest"} | ||
{"@timestamp":"2020-04-16T11:20:02.069Z", "log.level":"TRACE", "id":"5xy3gnEBmUEb0NJ1lijF", "message":"[test_index/M4fNwSWlTfek9m1SNL49Kg]", "source":"{\\\"f", "took":"15.1ms", "took_millis":"15" , "service.name":"ES_ECS","process.thread.name":"elasticsearch[integTest-0][write][T#2]","log.logger":"index.indexing.slowlog.index.M4fNwSWlTfek9m1SNL49Kg","type":"index_indexing_slowlog","cluster.uuid":"HHmOPeWKQlSeaF88DSfFVw","node.id":"wxTr7N_gRWWg3mUdY4spbg","node.name":"integTest-0","cluster.name":"integTest"} | ||
{"@timestamp":"2020-04-16T11:20:02.777Z", "log.level":"TRACE", "id":"6By3gnEBmUEb0NJ1mSij", "message":"[test_index/Jsz7IUYMQ9ubo2ahiMgCbQ]", "source":"{\\\"field\\\":123}", "took":"10.4ms", "took_millis":"10" , "service.name":"ES_ECS","process.thread.name":"elasticsearch[integTest-0][write][T#4]","log.logger":"index.indexing.slowlog.index.Jsz7IUYMQ9ubo2ahiMgCbQ","type":"index_indexing_slowlog","cluster.uuid":"HHmOPeWKQlSeaF88DSfFVw","node.id":"wxTr7N_gRWWg3mUdY4spbg","node.name":"integTest-0","cluster.name":"integTest"} |
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 @@ | ||
[ | ||
{ | ||
"@timestamp": "2020-04-16T11:20:02.069Z", | ||
"elasticsearch.cluster.name": "integTest", | ||
"elasticsearch.cluster.uuid": "HHmOPeWKQlSeaF88DSfFVw", | ||
"elasticsearch.index.id": "M4fNwSWlTfek9m1SNL49Kg", | ||
"elasticsearch.index.name": "test_index", | ||
"elasticsearch.node.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"elasticsearch.node.name": "integTest-0", | ||
"elasticsearch.slowlog.id": "5xy3gnEBmUEb0NJ1lijF", | ||
"elasticsearch.slowlog.source": "{\\\"f", | ||
"elasticsearch.slowlog.took": "15.1ms", | ||
"event.category": "database", | ||
"event.dataset": "elasticsearch.slowlog", | ||
"event.duration": 15000000, | ||
"event.kind": "event", | ||
"event.module": "elasticsearch", | ||
"event.type": "info", | ||
"fileset.name": "slowlog", | ||
"host.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"input.type": "log", | ||
"log.level": "TRACE", | ||
"log.logger": "index.indexing.slowlog.index.M4fNwSWlTfek9m1SNL49Kg", | ||
"log.offset": 0, | ||
"message": "{\"@timestamp\":\"2020-04-16T11:20:02.069Z\", \"log.level\":\"TRACE\", \"id\":\"5xy3gnEBmUEb0NJ1lijF\", \"message\":\"[test_index/M4fNwSWlTfek9m1SNL49Kg]\", \"source\":\"{\\\\\\\"f\", \"took\":\"15.1ms\", \"took_millis\":\"15\" , \"service.name\":\"ES_ECS\",\"process.thread.name\":\"elasticsearch[integTest-0][write][T#2]\",\"log.logger\":\"index.indexing.slowlog.index.M4fNwSWlTfek9m1SNL49Kg\",\"type\":\"index_indexing_slowlog\",\"cluster.uuid\":\"HHmOPeWKQlSeaF88DSfFVw\",\"node.id\":\"wxTr7N_gRWWg3mUdY4spbg\",\"node.name\":\"integTest-0\",\"cluster.name\":\"integTest\"}", | ||
"process.thread.name": "elasticsearch[integTest-0][write][T#2]", | ||
"service.name": "ES_ECS", | ||
"service.type": "elasticsearch" | ||
}, | ||
{ | ||
"@timestamp": "2020-04-16T11:20:02.777Z", | ||
"elasticsearch.cluster.name": "integTest", | ||
"elasticsearch.cluster.uuid": "HHmOPeWKQlSeaF88DSfFVw", | ||
"elasticsearch.index.id": "Jsz7IUYMQ9ubo2ahiMgCbQ", | ||
"elasticsearch.index.name": "test_index", | ||
"elasticsearch.node.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"elasticsearch.node.name": "integTest-0", | ||
"elasticsearch.slowlog.id": "6By3gnEBmUEb0NJ1mSij", | ||
"elasticsearch.slowlog.source": "{\\\"field\\\":123}", | ||
"elasticsearch.slowlog.took": "10.4ms", | ||
"event.category": "database", | ||
"event.dataset": "elasticsearch.slowlog", | ||
"event.duration": 10000000, | ||
"event.kind": "event", | ||
"event.module": "elasticsearch", | ||
"event.type": "info", | ||
"fileset.name": "slowlog", | ||
"host.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"input.type": "log", | ||
"log.level": "TRACE", | ||
"log.logger": "index.indexing.slowlog.index.Jsz7IUYMQ9ubo2ahiMgCbQ", | ||
"log.offset": 514, | ||
"message": "{\"@timestamp\":\"2020-04-16T11:20:02.777Z\", \"log.level\":\"TRACE\", \"id\":\"6By3gnEBmUEb0NJ1mSij\", \"message\":\"[test_index/Jsz7IUYMQ9ubo2ahiMgCbQ]\", \"source\":\"{\\\\\\\"field\\\\\\\":123}\", \"took\":\"10.4ms\", \"took_millis\":\"10\" , \"service.name\":\"ES_ECS\",\"process.thread.name\":\"elasticsearch[integTest-0][write][T#4]\",\"log.logger\":\"index.indexing.slowlog.index.Jsz7IUYMQ9ubo2ahiMgCbQ\",\"type\":\"index_indexing_slowlog\",\"cluster.uuid\":\"HHmOPeWKQlSeaF88DSfFVw\",\"node.id\":\"wxTr7N_gRWWg3mUdY4spbg\",\"node.name\":\"integTest-0\",\"cluster.name\":\"integTest\"}", | ||
"process.thread.name": "elasticsearch[integTest-0][write][T#4]", | ||
"service.name": "ES_ECS", | ||
"service.type": "elasticsearch" | ||
} | ||
] |
3 changes: 2 additions & 1 deletion
3
filebeat/module/elasticsearch/slowlog/test/es_search_slowlog.800.log
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
{"@timestamp":"2020-04-15T12:35:21.270Z", "log.level":"TRACE", "id":"null", "message":"[test_index][0]", "search_type":"QUERY_THEN_FETCH", "source":"{}", "stats":"[]", "took":"11ms", "took_millis":"11", "total_hits":"0 hits", "total_shards":"1" , "service.name":"ES_ECS","process.thread.name":"elasticsearch[integTest-0][search][T#1]","log.logger":"index.search.slowlog.query.XouPROkuRtybzItor6Ln2w","type":"index_search_slowlog","cluster.uuid":"a0P-i2H5R9-tJqwtF7BL0A","node.id":"FFMF7MVISuCWZMtxGmcGhg","node.name":"integTest-0","cluster.name":"integTest"} | ||
{"@timestamp":"2020-04-16T11:20:02.828Z", "log.level":"TRACE", "id":"null", "message":"[test_index][0]", "search_type":"QUERY_THEN_FETCH", "source":"{\\\"query\\\":{\\\"match_all\\\":{\\\"boost\\\":1.0}}}", "stats":"[]", "took":"10ms", "took_millis":"10", "total_hits":"0 hits", "total_shards":"1" , "service.name":"ES_ECS","process.thread.name":"elasticsearch[integTest-0][search][T#1]","log.logger":"index.search.slowlog.query.Jsz7IUYMQ9ubo2ahiMgCbQ","type":"index_search_slowlog","cluster.uuid":"HHmOPeWKQlSeaF88DSfFVw","node.id":"wxTr7N_gRWWg3mUdY4spbg","node.name":"integTest-0","cluster.name":"integTest"} | ||
{"@timestamp":"2020-04-16T11:20:02.839Z", "log.level":"TRACE", "id":"my-identifier", "message":"[test_index][0]", "search_type":"QUERY_THEN_FETCH", "source":"{\\\"query\\\":{\\\"match_all\\\":{\\\"boost\\\":1.0}}}", "stats":"[]", "took":"76.4micros", "took_millis":"0", "total_hits":"0 hits", "total_shards":"1" , "service.name":"ES_ECS","process.thread.name":"elasticsearch[integTest-0][search][T#3]","log.logger":"index.search.slowlog.query.Jsz7IUYMQ9ubo2ahiMgCbQ","type":"index_search_slowlog","cluster.uuid":"HHmOPeWKQlSeaF88DSfFVw","node.id":"wxTr7N_gRWWg3mUdY4spbg","node.name":"integTest-0","cluster.name":"integTest"} |
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,66 @@ | ||
[ | ||
{ | ||
"@timestamp": "2020-04-16T11:20:02.828Z", | ||
"elasticsearch.cluster.name": "integTest", | ||
"elasticsearch.cluster.uuid": "HHmOPeWKQlSeaF88DSfFVw", | ||
"elasticsearch.index.name": "test_index", | ||
"elasticsearch.node.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"elasticsearch.node.name": "integTest-0", | ||
"elasticsearch.shard.id": "0", | ||
"elasticsearch.slowlog.id": "null", | ||
"elasticsearch.slowlog.search_type": "QUERY_THEN_FETCH", | ||
"elasticsearch.slowlog.source": "{\\\"query\\\":{\\\"match_all\\\":{\\\"boost\\\":1.0}}}", | ||
"elasticsearch.slowlog.stats": "[]", | ||
"elasticsearch.slowlog.took": "10ms", | ||
"elasticsearch.slowlog.total_hits": "0 hits", | ||
"elasticsearch.slowlog.total_shards": "1", | ||
"event.category": "database", | ||
"event.dataset": "elasticsearch.slowlog", | ||
"event.duration": 10000000, | ||
"event.kind": "event", | ||
"event.module": "elasticsearch", | ||
"event.type": "info", | ||
"fileset.name": "slowlog", | ||
"host.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"input.type": "log", | ||
"log.level": "TRACE", | ||
"log.logger": "index.search.slowlog.query.Jsz7IUYMQ9ubo2ahiMgCbQ", | ||
"log.offset": 0, | ||
"message": "{\"@timestamp\":\"2020-04-16T11:20:02.828Z\", \"log.level\":\"TRACE\", \"id\":\"null\", \"message\":\"[test_index][0]\", \"search_type\":\"QUERY_THEN_FETCH\", \"source\":\"{\\\\\\\"query\\\\\\\":{\\\\\\\"match_all\\\\\\\":{\\\\\\\"boost\\\\\\\":1.0}}}\", \"stats\":\"[]\", \"took\":\"10ms\", \"took_millis\":\"10\", \"total_hits\":\"0 hits\", \"total_shards\":\"1\" , \"service.name\":\"ES_ECS\",\"process.thread.name\":\"elasticsearch[integTest-0][search][T#1]\",\"log.logger\":\"index.search.slowlog.query.Jsz7IUYMQ9ubo2ahiMgCbQ\",\"type\":\"index_search_slowlog\",\"cluster.uuid\":\"HHmOPeWKQlSeaF88DSfFVw\",\"node.id\":\"wxTr7N_gRWWg3mUdY4spbg\",\"node.name\":\"integTest-0\",\"cluster.name\":\"integTest\"}", | ||
"process.thread.name": "elasticsearch[integTest-0][search][T#1]", | ||
"service.name": "ES_ECS", | ||
"service.type": "elasticsearch" | ||
}, | ||
{ | ||
"@timestamp": "2020-04-16T11:20:02.839Z", | ||
"elasticsearch.cluster.name": "integTest", | ||
"elasticsearch.cluster.uuid": "HHmOPeWKQlSeaF88DSfFVw", | ||
"elasticsearch.index.name": "test_index", | ||
"elasticsearch.node.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"elasticsearch.node.name": "integTest-0", | ||
"elasticsearch.shard.id": "0", | ||
"elasticsearch.slowlog.id": "my-identifier", | ||
"elasticsearch.slowlog.search_type": "QUERY_THEN_FETCH", | ||
"elasticsearch.slowlog.source": "{\\\"query\\\":{\\\"match_all\\\":{\\\"boost\\\":1.0}}}", | ||
"elasticsearch.slowlog.stats": "[]", | ||
"elasticsearch.slowlog.took": "76.4micros", | ||
"elasticsearch.slowlog.total_hits": "0 hits", | ||
"elasticsearch.slowlog.total_shards": "1", | ||
"event.category": "database", | ||
"event.dataset": "elasticsearch.slowlog", | ||
"event.duration": 0, | ||
"event.kind": "event", | ||
"event.module": "elasticsearch", | ||
"event.type": "info", | ||
"fileset.name": "slowlog", | ||
"host.id": "wxTr7N_gRWWg3mUdY4spbg", | ||
"input.type": "log", | ||
"log.level": "TRACE", | ||
"log.logger": "index.search.slowlog.query.Jsz7IUYMQ9ubo2ahiMgCbQ", | ||
"log.offset": 613, | ||
"message": "{\"@timestamp\":\"2020-04-16T11:20:02.839Z\", \"log.level\":\"TRACE\", \"id\":\"my-identifier\", \"message\":\"[test_index][0]\", \"search_type\":\"QUERY_THEN_FETCH\", \"source\":\"{\\\\\\\"query\\\\\\\":{\\\\\\\"match_all\\\\\\\":{\\\\\\\"boost\\\\\\\":1.0}}}\", \"stats\":\"[]\", \"took\":\"76.4micros\", \"took_millis\":\"0\", \"total_hits\":\"0 hits\", \"total_shards\":\"1\" , \"service.name\":\"ES_ECS\",\"process.thread.name\":\"elasticsearch[integTest-0][search][T#3]\",\"log.logger\":\"index.search.slowlog.query.Jsz7IUYMQ9ubo2ahiMgCbQ\",\"type\":\"index_search_slowlog\",\"cluster.uuid\":\"HHmOPeWKQlSeaF88DSfFVw\",\"node.id\":\"wxTr7N_gRWWg3mUdY4spbg\",\"node.name\":\"integTest-0\",\"cluster.name\":\"integTest\"}", | ||
"process.thread.name": "elasticsearch[integTest-0][search][T#3]", | ||
"service.name": "ES_ECS", | ||
"service.type": "elasticsearch" | ||
} | ||
] |