fluentd - Windows GELF plugin

710 views
Skip to first unread message

Stephen

unread,
Feb 17, 2017, 6:57:42 AM2/17/17
to Fluentd Google Group
Hello,

I'm using the v0.14 experimental Windows fluentd MSI, following the instructions at http://docs.fluentd.org/v0.14/articles/install-by-msi

I'm trying to install/use the GELF plugin, to send logs to to Graylog2.


When I try and run fluentd (fluentd -c conf\td-agent.conf), I get the error
[error]: config error file="conf\\td-agent.conf" error_class=Fluent::ConfigError error="Unknown output plugin 'gelf'. Run 'gem search-rd fluent-plugin' to find plugins"


As stated in the documentation, I have attempted to install the plugin with 'fluent-gem install gelf', which says it successfully installs, but I get the same error when rerunning.

Am I missing something? Can anyone provide any assistance?

Many thanks,
Stephen


My td-agent.conf file
<source>
  type tail
  tag graylog2.test.app1
  path c:\testlogs\%Y-%m-%d.txt
  pos_file c:\testlogs\fluentd-test.log.pos
  format multiline
  format_firstline /^\[\d{2}\:\d{2}\:\d{2}/
  format1 /^\[(?<time>\d{2}\:\d{2}\:\d{2})\: (?<msgtype>.*)\]\: (?<message>.*)/
</source>

<match graylog2.**>
  type copy
  <store>
    type gelf
    host graylog.mydomain.net
    port 12201
    flush_interval 5s
  </store>
</match>

Mr. Fiber

unread,
Feb 24, 2017, 12:43:23 AM2/24/17
to Fluentd Google Group
Where to install fluent-plugin-gelf code?


Masahiro

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen

unread,
Mar 7, 2017, 12:37:28 PM3/7/17
to Fluentd Google Group
I still don't fully understand why the plugin is not working/available when running a 'fluent-gem search gelf' and installing all gelf related plugins, but I manually downloaded the fluent-plugin-gelf plugin from https://github.com/emsearcy/fluent-plugin-gelf, and put it in C:\opt\td-agent\embedded\lib\ruby\gems\2.3.0\gems\fluent-plugin-gelf.

Then ran the following:
fluentd -c conf\td-agent.conf -p "C:\opt\td-agent\embedded\lib\ruby\gems\2.3.0\gems\fluent-plugin-gelf\lib\fluent\plugin"


It's now working and reporting logs back to Graylog as intended.

Mr. Fiber

unread,
Mar 8, 2017, 1:30:50 AM3/8/17
to Fluentd Google Group
The problem is windows doesn't have unified directory structure.
On Linux, fluentd uses /etc/fluent and td-agent uses /etc/td-agent for configuration and plugin directory by default.
But windows doesn't have such directories, e.g. /etc, /var, /tmp.
If you use -p option, directory path has no limitation.
Downloading out_gelf.rb into `C:\opt\td-agent\plugin` and `-p C:\opt\td-agent\plugin` should work.

I want to know a good way for directory structure on Windows.


--
Reply all
Reply to author
Forward
0 new messages