gpt4 book ai didi

mongodb - 未在Kibana中为MongoDB + Logstash + ElasticSearch创建索引

转载 作者:行者123 更新时间:2023-12-03 01:11:30 25 4
gpt4 key购买 nike

我正在尝试使用logstash配置可视化kibana中的mongodb数据。以下是我的配置。我在终端中获得一些输出,并且它永远循环。我看不到配置文件中提到的名称创建的任何索引,并且如果生成了索引,也没有任何数据。在发现选项卡中没有找到匹配的结果。如何进行配置以显示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"]
}
}
enter image description here
http:// localhost:9200 / ayesha_logs / _search?pretty
enter image description here
终端日志:
D,[2020-10-01T08:11:45.717000#2372]调试-:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017 req:259 conn:1:1 sconn:231839 | coexistence-poc.listCollections |已开始| {“listCollections” => 1,“cursor” => {},“nameOnly” => true,“$ db” =>“coexistence-poc”,“$ clusterTime” => {“clusterTime” =># ,“signature” => {“hash” => D,[2020-10-01T08:11:45.755000#2372]调试-:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017 req:259 | coexistence-poc.listCollections |成功| 0.038秒
D,[2020-10-01T08:11:50.801000#2372]调试-:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017 req:260 conn:1:1 sconn:231839 |共存-poc.find |已开始{“find” =>“coexistence-pinfobackfill-logs”,“filter” => {“_ id” => {“$ gt” => BSON::ObjectId('5f71f009b6b9115861d379d8')}},“limit” => 50 ,“$ db” =>“coexistence-poc”,“$ clusterTime” => {“clusterTime” =># ,...
D,[2020-10-01T08:11:50.843000#2372]调试-:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017 req:260 |共存-poc.find |成功| 0.042秒
D,[2020-10-01T08:11:50.859000#2372]调试-:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017 req:261 conn:1:1 sconn:231839 | coexistence-poc.listCollections |已开始| {“listCollections” => 1,“cursor” => {},“nameOnly” => true,“$ db” =>“coexistence-poc”,“$ clusterTime” => {“clusterTime” =># ,“signature” => {“hash” => D,[2020-10-01T08:11:50.906000#2372]调试-:MONGODB | range-api-test-cluster-shard-00-02.icqif.azure.mongodb.net:27017 req:261 | coexistence-poc.listCollections |成功| 0.047秒
enter image description here

最佳答案

您是否创建了Kibana的索引模式?
如果没有,只需转到菜单>堆栈管理> Kibana>索引模式
点击enter image description here
并按照步骤进行。
enter image description here
然后,您将可以在“发现”或“可视化”选项卡中使用索引。

关于mongodb - 未在Kibana中为MongoDB + Logstash + ElasticSearch创建索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64140274/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com