【问题标题】:mongodb input plugin using logstash elasticsearch使用logstash elasticsearch的mongodb输入插件
【发布时间】:2015-10-29 10:36:18
【问题描述】:

运行 conf 文件时出现此错误

D:\elastic search\logstash-1.5.3\bin>logstash -f mongo.conf
io/console not supported; tty will not be manipulated
Warning: No private key present, creating unsigned gem.
The error reported is:
  No connection string specified

这是我的配置文件

input {
  mongodb {
    uri => 'mongodb://root:root@localhost:27017/mydb'
    path => '/opt/logstash-mongodb/logstash_sqlite.db'
    collection => 'bike'
    port => 27017
    unpack_mongo_id => true
    batch_size => 5000
  }
}

【问题讨论】:

    标签: mongodb elasticsearch logstash


    【解决方案1】:

    URI 已经在主机(localhost:27017)后面指定了一个端口,不需要再有“端口”。尝试对您的 URI 使用 SSL 作为 mongodb://username:password@host:port/db?ssl=true

    【讨论】:

      【解决方案2】:

      提供authSourceplaceholder_db_dirplaceholder_db_name如下:

      input {
        mongodb {
          uri => 'mongodb://root:root@localhost:27017/mydb?authSource=admin'
          placeholder_db_dir => 'C:\ELK\logstash-5.3.0\data'
          placeholder_db_name => 'logstash_sqlite.db'
          collection => 'bike'
          unpack_mongo_id => true
          batch_size => 5000
        }
      }
      

      【讨论】:

        猜你喜欢
        • 2016-08-19
        • 2021-08-18
        • 1970-01-01
        • 1970-01-01
        • 2019-10-27
        • 2015-09-29
        • 2020-09-14
        • 2020-05-06
        • 1970-01-01
        相关资源
        最近更新 更多