使用netstat -lntp来看看有侦听在网络某端口的进程。当然,也可以使用 lsof。

logstash如何使用logstash-filter-ipip插件解析ip数据?使用自定义插件的安装方法,收获了一堆错误,无法使用。请教具体应该如何操作

Logstash | 作者 hroc | 发布于2016年09月07日 | 阅读数:8786

看到三斗大神对使用ipip.net的ip数据库的介绍,想尝试使用一下,无奈多次尝试仍然不行,请教各位具体应该如何操作?
环境和操作如下:
1、logstash版本为2.3.4
2、在github上下载了logstash-filter-ipip-master代码,更名为logstash-filter-ipip,放在logstash安装目录的vendor/bundle/jruby/1.9/gems目录下
3、编辑了logstash安装目录下的Gemfile文件,添加gem "logstash-filter-ipip", :path => "vendor/bundle/jruby/1.9/gems/logstash-filter-ipip"
4、放置ip数据文件为vendor/ipip.datx
5、使用bin/logstash-plugin list查看安装的插件,出现如下错误:


[appweb@hs100 bin]$ ./logstash-plugin list
Ignoring ffi-1.9.13 because its extensions are not built.  Try: gem pristine ffi --version 1.9.13
Bundler::GemspecError: There was a Errno::ENOENT while loading logstash-filter-ipip.gemspec: 
No such file or directory - git from
  /home/appweb/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-filter-ipip/logstash-filter-ipip.gemspec:13:in `eval_gemspec'
 


尝试使用
bin/plugin install --no-verify命令出现如下错误:


[appweb@hs100 bin]$ ./plugin install --no-verify
The use of bin/plugin is deprecated and will be removed in a feature release. Please use bin/logstash-plugin.
Ignoring ffi-1.9.13 because its extensions are not built.  Try: gem pristine ffi --version 1.9.13
Installing...
Error Bundler::GemspecError, retrying 1/10
There was a Errno::ENOENT while loading logstash-filter-ipip.gemspec: 
No such file or directory - git from
  /home/appweb/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-filter-ipip/logstash-filter-ipip.gemspec:13:in `eval_gemspec'
Error Bundler::GemspecError, retrying 2/10
There was a Errno::ENOENT while loading logstash-filter-ipip.gemspec: 
No such file or directory - git from
  /home/appweb/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-filter-ipip/logstash-filter-ipip.gemspec:13:in `eval_gemspec'
Error Bundler::GemspecError, retrying 3/10
There was a Errno::ENOENT while loading logstash-filter-ipip.gemspec: 
No such file or directory - git from
  /home/appweb/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-filter-ipip/logstash-filter-ipip.gemspec:13:in `eval_gemspec'
Error Bundler::GemspecError, retrying 4/10
There was a Errno::ENOENT while loading logstash-filter-ipip.gemspec: 
No such file or directory - git from
  /home/appweb/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-filter-ipip/logstash-filter-ipip.gemspec:13:in `eval_gemspec'
Error Bundler::GemspecError, retrying 5/10
………………………………………………


请教各位,应该怎么操作才能成功……
 
已邀请:

hroc - 80后it男

赞同来自: medcl Dm

终于搞清楚了原因,我下载的这个版本的插件只能用于logstash1.X,不支持logstash2.3
 

要回复问题请先登录注册