使用 shuf 来打乱一个文件中的行或是选择文件中一个随机的行。

mongo-logstash-Elasticsearch 获取数据一直test.find

Logstash | 作者 cc1079154808 | 发布于2020年06月15日 | 阅读数:1345

下面是日志{"@timestamp":"2020-06-12T05:45:40.357Z","mongoipdz":"ns2.smartunits.com","mongoym":"domaincontrol.ca","utype":"ns"             ,"type":"sy","_class":"com.cetc15.dept6.ccs1.mongo.entity.ymxw.sy","uid":"5edfa69d28a11f6070c9b722","la             st_seen":"2020-06-09T15:11:25Z"}
{"@timestamp":"2020-06-12T05:45:40.357Z","mongoipdz":"ns1.smartunits.com root.smartunits.com 2019021501 3600 1800 6             04800 86400","mongoym":"domaincontrol.ca","utype":"soa","type":"sy","_class":"com.cetc15.dept6.ccs1.mongo.ent             ity.ymxw.sy","uid":"5edfa69d28a11f6070c9b723","last_seen":"2020-06-09T15:11:25Z"}
D, [2020-06-11T21:45:45.383443 #2430] DEBUG -- : MONGODB | [813] 192.168.24.15:23000 #1 | test.find | STARTED | {"f             ind"=>"sy", "filter"=>{"_id"=>{"$gt"=>BSON::ObjectId('5edfa69d28a11f6070c9b723')}}, "limit"=>1000000, "$db"=>             "test"}
D, [2020-06-11T21:45:45.387394 #2430] DEBUG -- : MONGODB | [813] 192.168.24.15:23000 | test.find | SUCCEEDED | 0.00             3s
D, [2020-06-11T21:45:45.396356 #2430] DEBUG -- : MONGODB | [814] 192.168.24.15:23000 #1 | test.listCollections | ST             ARTED | {"listCollections"=>1, "cursor"=>{}, "nameOnly"=>true, "$db"=>"test"}
D, [2020-06-11T21:45:45.400356 #2430] DEBUG -- : MONGODB | [814] 192.168.24.15:23000 | test.listCollections | SUCCE             EDED | 0.003s
D, [2020-06-11T21:45:50.411737 #2430] DEBUG -- : MONGODB | [815] 192.168.24.15:23000 #1 | test.find | STARTED | {"f             ind"=>"sy", "filter"=>{"_id"=>{"$gt"=>BSON::ObjectId('5edfa69d28a11f6070c9b723')}}, "limit"=>1000000, "$db"=>             "test"}
D, [2020-06-11T21:45:50.415618 #2430] DEBUG -- : MONGODB | [815] 192.168.24.15:23000 | test.find | SUCCEEDED | 0.00             3s
D, [2020-06-11T21:45:50.426620 #2430] DEBUG -- : MONGODB | [816] 192.168.24.15:23000 #1 | test.listCollections | ST             ARTED | {"listCollections"=>1, "cursor"=>{}, "nameOnly"=>true, "$db"=>"test"}
D, [2020-06-11T21:45:50.431588 #2430] DEBUG -- : MONGODB | [816] 192.168.24.15:23000 | test.listCollecti `ons | SUCCE             EDED | 0.004s
D, [2020-06-11T21:45:55.443309 #2430] DEBUG -- : MONGODB | [817] 192.168.24.15:23000 #1 | test.find | STARTED | {"f             ind"=>"sy", "filter"=>{"_id"=>{"$gt"=>BSON::ObjectId('5edfa69d28a11f6070c9b723')}}, "limit"=>1000000, "$db"=>             "test"}
D, [2020-06-11T21:45:55.447383 #2430] DEBUG -- : MONGODB | [817] 192.168.24.15:23000 | test.find | SUCCEEDED | 0.00             3s
D, [2020-06-11T21:45:55.461716 #2430] DEBUG -- : MONGODB | [818] 192.168.24.15:23000 #1 | test.listCollections | ST             ARTED | {"listCollections"=>1, "cursor"=>{}, "nameOnly"=>true, "$db"=>"test"}
D, [2020-06-11T21:45:55.467978 #2430] DEBUG -- : MONGODB | [818] 192.168.24.15:23000 | test.listCollections | SUCCE             EDED | 0.004s
下面的没复制了  开始重复着上面的  test.find
已邀请:

要回复问题请先登录注册