我正在尝试使用logstash configuration.Below在kibana中可视化mongodb数据,这是我的配置。我在终端中获得了一些输出,但它永远循环。我看不到使用配置文件中提到的名称创建的任何索引,如果索引是生成的,也不会有任何数据。在发现tab.How中说没有匹配的结果来进行配置以可视化kibana中的数据?
input {
mongodb {
uri => "mongodb+srv:@@@@@@@@@@@@@@@?retryWrites=true&w=majority"
placeholder_db_dir => "C:/logstash-mongodb"
placeholder_db_name => "logstash1_sqlite.db"
collection => "logs"
batch_size => 1
}
}
filter {
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
action => "index"
index => "ayesha_logs"
hosts => ["localhost:9200"]
}
}

http://localhost:9200/ayesha_logs/_search?pretty

终端日志: D,2020-10-01T08:11:45.717000 #2372DEBUG --:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017请求:259conn:1:1 sconn:231839 |共存-poc.listCollections|已启动| {"listCollections"=>1,“=>”=>{},"nameOnly"=>true,“$db”=>“共存-poc”,MONGODB @increment=1,@seconds=1601532700>,“signature”哈希{“=>”=>“共存-pinfobackfill-=>50”,"filter"=>{"_id"=>{"$gt"=>BSON::ObjectId('5f71f009b6b9115861d379d8')}},"limit"=>50,“$db”=>“共存-poc”,"$clusterTime"=>{"clusterTime"=>#,...D,2020-10-01T08:11:50.843000 #2372DEBUG --:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017请求:260%|共存-poc.find.find|成功| 0.042s D,2020-10-01T08:11:50.859000 #2372DEBUG --:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017请求:261conn:1:1sconn:231839|共存-poc.find.listCollection|已启动| {"listCollections"=>1,“"$clusterTime"=>{"clusterTime"=>#{},"nameOnly"=>true,“$db”=>“共存-poc”,游标@increment=1,@seconds=1601532700>,“signature”=>{“nameOnly”=>

发布于 2020-10-01 13:45:08
你创建你的Kibana的索引模式了吗?如果没有,只需进入菜单>堆栈管理> Kibana >索引模式
点击

并按照以下步骤操作。

然后,您将能够在Discover或可视化选项卡中使用索引。
https://stackoverflow.com/questions/64140274
复制相似问题