问题描述
我正在尝试使用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"]
}
}
http:// localhost:9200 / ayesha_logs / _search?pretty
终端日志:
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” =>#