Reputation: 511
I created a custom plugin called in_vCenterCrawler.rb and added it to the folder /etc/td-agent/plugin. In the file /etc/td-agent/td-agent.conf I have:
<source>
@type vCenterCrawler #Also tried with in_vCenterCrawler
port ****
host '**.*.***.***'
vCenterPort ***
user "****"
password "****"
</source>
When I run the command 'td-agent' I get the error:
config error file="/etc/td-agent/td-agent.conf" error="Unknown input plugin 'vCenterCrawler'. Run 'gem search -rd fluent-plugin' to find plugins
If I run 'gem search -rd fluent-plugin' I get:
The program 'gem' can be found in the following packages:
* ruby
* rubygems
But after finding the information in https://docs.fluentd.org/v0.12/articles/plugin-management I assumed I needed to transform my plugin into a gem, so I executed the command "td-agent-gem install vCenterCrawler" and I got:
ERROR: Could not find a valid gem 'vCenterCrawler' (>= 0) in any repository
At this point I'm confused and I don't know if this is a bug or if I'm missing something. I'm using td-agent 0.12.40.
Thanks for any help.
Upvotes: 1
Views: 2252
Reputation: 511
I found what is the problem.
In the configuration file the type name should be the one defined in the plugin and not the plugin file itself.
In my plugin I have:
module Fluent
class VCenterCrawlerInput < Input
# First, register the plugin with the name vCenterCrawler
Fluent::Plugin.register_input('vcentercrawler', self)
...
Which means I registered the plugin name as being vcentercrawler. I used the:
@type vcentercrawler
and it worked!
Upvotes: 3