安装fluentd时配置fluent-plugin-elasticsearch发生的错误

安装fluentd时配置fluent-plugin-elasticsearch发生的错误
我们在进行fluentd,elasticsearch,kibana环境搭建时,fluentd需要es作为存储的平台,这个时候在配置 vi /etc/td-agent/td-agent.conf时
  1. <match task.**>
  2. host 192.168.0.1 ##### elasticsearch 服务地址
  3. type elasticsearch
  4. logstash_format true
  5. flush_interval 5s
  6. include_tag_key true
  7. tag_key mapred
  8. </match>


中间涉及到使用elasticsearch,所以我们要安装

fluent-plugin-elasticsearch

/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch
发生错误:ERROR:  Error installing fluent-plugin-elasticsearch:    ERROR: Failed to build gem native extension.        /usr/lib64/fluent/ruby/bin/ruby extconf.rbchecking for curl-config... nochecking for main() in -lcurl... no*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers.  Check the mkmf.log file for moredetails.  You may need configuration options.Provided configuration options:    --with-opt-dir    --without-opt-dir    --with-opt-include    --without-opt-include=${opt-dir}/include    --with-opt-lib    --without-opt-lib=${opt-dir}/lib    --with-make-prog    --without-make-prog    --srcdir=.    --curdir    --ruby=/usr/lib64/fluent/ruby/bin/ruby    --with-curl-dir    --without-curl-dir    --with-curl-include    --without-curl-include=${curl-dir}/include    --with-curl-lib    --without-curl-lib=${curl-dir}/lib    --with-curllib    --without-curllibextconf.rb:39:in `<main>':   Can't find libcurl or curl/curl.h (RuntimeError)
这个是由于我们没有安装 libcurl-devel造成的,我们只要先yum install  libcurl-devel,再次重新/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch时就可以顺利进行下去。如此,fluentd配置成功,可以启动service td-agent start

免责声明:本网信息来自于互联网,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们,本站将会在24小时内处理完毕。
相关文章
返回顶部