2017-12-13 13 views
0

in_vCenterCrawler.rb라는 사용자 정의 플러그인을 작성하여/etc/td-agent/plugin 폴더에 추가했습니다. 파일 /etc/td-agent/td-agent.conf에서 내가 가진 :Fluentd td-agent가 사용자 정의 플러그인을 인식하지 못합니다. 알 수없는 입력 플러그인

config error file="/etc/td-agent/td-agent.conf" error="Unknown input plugin 'vCenterCrawler'. Run 'gem search -rd fluent-plugin' to find plugins 

내가 실행하는 경우 :

<source> 
    @type vCenterCrawler #Also tried with in_vCenterCrawler 
    port **** 
    host '**.*.***.***' 
    vCenterPort *** 
    user "****" 
    password "****" 
</source> 

내가 오류가 나는 명령을 실행하면 '에이전트를 TD' 내가 할 '보석 검색 유창 - 플러그인을 -RD'

The program 'gem' can be found in the following packages: 
* ruby 
* rubygems 

을하지만 내가 보석에 내 플러그인을 변환하는 데 필요한 가정 https://docs.fluentd.org/v0.12/articles/plugin-management의 정보를 찾은 후, 그래서 명령 "TD-에이전트 보석 설치 실행 vCenterCrawler "와 내가 가지고있는 :

ERROR: Could not find a valid gem 'vCenterCrawler' (>= 0) in any repository 

이 시점에서 저는 혼란 스럽습니다. 버그인지 또는 뭔가 빠졌는지 모르겠습니다. 나는 td-agent 0.12.40을 사용하고있다.

도움 주셔서 감사합니다.

답변

0

문제점을 발견했습니다.

구성 파일에서 유형 이름은 플러그인 파일 자체가 아니라 플러그인에 정의 된 이름이어야합니다. 내 플러그인에서

나는이 : 나는 vcentercrawler 것으로 플러그인 이름을 등록한 의미

module Fluent 
    class VCenterCrawlerInput < Input 
    # First, register the plugin with the name vCenterCrawler 
    Fluent::Plugin.register_input('vcentercrawler', self) 
... 

합니다. 나는 다음을 사용했다 :

@type vcentercrawler 

그리고 그것은 일했다!