为 mongodb 连接运行 logstash 时出错

阿蒂夫法拉兹 |

运行时出现此错误。我正在尝试在 mongodb 和 elasticsearch 之间添加连接。通过logstash 添加数据以进行持续监控。然后我们将添加到 Kibana。但是遇到这个错误,不知道是conf文件格式问题还是什么?

# bin/logstash -f /etc/logstash/conf.d/mongodata.conf --config.debug
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.11.1.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[WARN ] 2020-06-17 11:12:25.705 [main] runner - --config.debug was specified, but log.level was not set to 'debug'! No config info will be logged.
[WARN ] 2020-06-17 11:12:25.937 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2020-06-17 11:12:25.939 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=>"7.7.0"}
[ERROR] 2020-06-17 11:12:26.495 [Converge PipelineAction::Create<main>] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \\t\\r\\n], \"#\", \"{\" at line 2, column 15 (byte 23) after input {\n        \"uri\" ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:58:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:66:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:28:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:27:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:181:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:67:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:43:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:342:in `block in converge_state'"]}
[INFO ] 2020-06-17 11:12:26.649 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO ] 2020-06-17 11:12:31.694 [LogStash::Runner] runner - Logstash shut down.

这是我的 conf 文件:

input {
        "uri" => "mongodb://liquid.nvidia.com:27017/"
        "placeholder_db_dir" => "/opt/logstash-mongodb/"
        "placeholder_db_name" => "logstash_sqlite.db"
        "collection" => "global_queue_list"
        "batch_size" => 5000
}
filter {

}
output {
        stdout {
                codec => rubydebug
        }
        elasticsearch {
                "action" => "index"
                "index" => "mongo_log_data"
                "hosts" => ["localhost:9200"]
        }
}

瓦尔

您缺少mongodb输入插件(请参阅此处

input {
    mongodb {
        "uri" => "mongodb://liquid.nvidia.com:27017/"
        "placeholder_db_dir" => "/opt/logstash-mongodb/"
        "placeholder_db_name" => "logstash_sqlite.db"
        "collection" => "global_queue_list"
        "batch_size" => 5000
    }
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用Logstash连接MYSQL时出错

Mongodb的外壳连接时给出错误?

使用Mongolite连接到MongoDB时出错

在MacOSX上运行MongoDb时出错

为 Yii 2 安装 MongoDB 扩展时出错

在 Kubernetes 上为 mongodb 创建 StatefulSet 时出错

连接时字符串'\ 0'为空时出错

如何为Logstash输入类型为MongoDB的输入

运行gnome-terminal时出现错误:“为org.gnome构造代理时出错...无法连接:连接被拒绝”

使用Node JS连接到Atlas MongoDB时出错

通过终端连接到MongoDB的本地安装时出错

使用密码从pyspark连接到mongodb时出错

连接到MongoDb Atlas服务器时出错

使用 mongo-spark-connector 连接到 mongodb 时出错

NestJS + TypeORM-连接到mysql和mongodb时出错

将 mongodb 连接到 node.js 时出错

为Python安装雪花连接器时出错

首次运行MongoDB:打开配置文件时出错。

为 mysql 运行共享 postrotate 脚本时出错

为我的Makefile.cpp运行make时出错

为 deepwalk 运行 python 2.7 代码时出错

为Lucene源代码运行ant时出错

在R中为1维数据运行CNN时出错

在python中为xgboost超参数运行gridsearchcv时出错

为 nordvpn 运行 apt-get update 时出错

MySQL-如何通过SSH连接运行长时间(> 14小时)的作业?

Xamarin Live Player 在加载位图时崩溃,但通过 USB 连接运行良好

恐慌:解析uri时出错:方案必须是“mongodb”或“mongodb+srv”Golang - MongoDB连接错误

恐慌:解析uri时出错:方案必须是“mongodb”或“mongodb+srv”Golang - MongoDB连接错误