logstash-output-mongodb安装

发布时间 2023-11-03 17:46:48作者: slnngk

 

1.安装插件:
[root@localhost bin]# ./logstash-plugin install logstash-output-mongodb
Validating logstash-output-mongodb
Installing logstash-output-mongodb

 

2.查看插件版本
./logstash-plugin list --verbose
logstash-output-mongodb (3.1.7)

 

同步报错误:

[2023-11-03T03:25:28,954][WARN ][logstash.outputs.mongodb ] MONGODB | Failed to handshake with 192.168.1.108:29001: ArgumentError: wrong number of arguments (given 2, expected 1)
[2023-11-03T03:25:28,955][WARN ][logstash.outputs.mongodb ] MONGODB | Error checking 192.168.1.108:29001: ArgumentError: wrong number of arguments (given 2, expected 1)
[2023-11-03T03:25:29,469][WARN ][logstash.outputs.mongodb ] MONGODB | Failed to handshake with 192.168.1.108:29001: ArgumentError: wrong number of arguments (given 2, expected 1)
[2023-11-03T03:25:29,469][WARN ][logstash.outputs.mongodb ] MONGODB | Error checking 192.168.1.108:29001: ArgumentError: wrong number of arguments (given 2, expected 1)
[2023-11-03T03:25:29,986][WARN ][logstash.outputs.mongodb ] MONGODB | Failed to handshake with 192.168.1.108:29001: ArgumentError: wrong number of arguments (given 2, expected 1)
[2023-11-03T03:25:29,986][WARN ][logstash.outputs.mongodb ] MONGODB | Error checking 192.168.1.108:29001: ArgumentError: wrong number of arguments (given 2, expected 1)

 

解决办法:
a.重新安装logstash
b.指定版本logstash-output-mongodb:
[root@localhost bin]#./logstash-plugin install --version=3.1.5 logstash-output-mongodb
c.重新安装logstash-input-mongodb
[root@localhost bin]# ./logstash-plugin install /soft/mongo2es/logstash-input-mongodb/logstash-input-mongodb-0.4.1.gem