Git Product home page Git Product logo

fluent-plugin-named_pipe's Introduction

fluent-plugin-named_pipe

Build Status

Named pipe input/output plugin for Fluentd.

Input Plugin

Configuration

<source>
  type named_pipe
  path /path/to/file
  tag foo.bar
  format ltsv
</match>

Parameters

  • path

    The file path of the named pipe

  • tag

    The emit tag name

  • format

    The input format such as regular expression, apache2, ltsv, etc. Same with in_tail plugin. See http://docs.fluentd.org/articles/in_tail

Output Plugin

Configuration

<match foo.bar.**>
  type named_pipe
  path /path/to/file
</match>

The output to the named pipe would be like:

foo.bar: {"foo":"bar"}

Parameters

  • path

    The file path of the named pipe

  • format

    The output format such as out_file, json, ltsv, single_value. Default is out_file.

ChangeLog

See CHANGELOG.md for details.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2014 Naotoshi Seo. See LICENSE for details.

fluent-plugin-named_pipe's People

Contributors

cosmo0920 avatar sonots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fluent-plugin-named_pipe's Issues

Plugin dies on startup

I don't know enough ruby to say what this means, but I'd really appreciate any insight you could offer.

os: fedora 25

[fedora@concourse-worker-3 ~]$ uname -a
Linux concourse-worker-3.novalocal 4.8.6-300.fc25.x86_64 #1 SMP Tue Nov 1 12:36:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

versions:

fluent-plugin-named_pipe (0.1.2)
fluentd (0.12.37)
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]

config

<source>
  @type named_pipe
  path /run/concourse/fluent.pipe
  tag concourse
  format json
</source>

<match concourse>
  @type stdout
</match>

stack trace

[fedora@concourse-worker-3 ~]$ fluentd -c ./fluent/test.conf -v
2017-07-06 23:47:36 +0000 [info]: fluent/supervisor.rb:471:read_config: reading config file path="./fluent/test.conf"
2017-07-06 23:47:36 +0000 [info]: fluent/supervisor.rb:337:supervise: starting fluentd-0.12.37
2017-07-06 23:47:36 +0000 [info]: fluent/engine.rb:126:block in configure: gem 'fluent-plugin-named_pipe' version '0.1.2'
2017-07-06 23:47:36 +0000 [info]: fluent/engine.rb:126:block in configure: gem 'fluent-plugin-systemd' version '0.2.0'
2017-07-06 23:47:36 +0000 [info]: fluent/engine.rb:126:block in configure: gem 'fluentd' version '0.12.37'
2017-07-06 23:47:36 +0000 [info]: fluent/agent.rb:129:add_match: adding match pattern="concourse" type="stdout"
2017-07-06 23:47:36 +0000 [info]: fluent/root_agent.rb:152:add_source: adding source type="named_pipe"
2017-07-06 23:47:36 +0000 [error]: fluent/supervisor.rb:369:rescue in main_process: config error file="./fluent/test.conf" error="NoMethodError: undefined method `method_defined?' for #<Fifo:0x0055d162416368 @pipe=#<File:/run/concourse/fluent.pipe>>\nDid you mean?  method_missing"
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluent-plugin-named_pipe-0.1.2/lib/fluent/plugin/in_named_pipe.rb:25:in `rescue in configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluent-plugin-named_pipe-0.1.2/lib/fluent/plugin/in_named_pipe.rb:21:in `configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/root_agent.rb:159:in `add_source'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/root_agent.rb:95:in `block in configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/root_agent.rb:92:in `each'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/root_agent.rb:92:in `configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/engine.rb:129:in `configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/engine.rb:103:in `run_configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:489:in `run_configure'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:160:in `block in start'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:366:in `main_process'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:339:in `block in supervise'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:338:in `fork'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:338:in `supervise'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/supervisor.rb:156:in `start'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/lib/fluent/command/fluentd.rb:173:in `<top (required)>'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/.gem/ruby/gems/fluentd-0.12.37/bin/fluentd:5:in `<top (required)>'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/bin/fluentd:22:in `load'
2017-07-06 23:47:36 +0000 [debug]: fluent/supervisor.rb:338:fork: /home/fedora/bin/fluentd:22:in `<main>'
2017-07-06 23:47:36 +0000 [info]: fluent/supervisor.rb:354:supervise: process finished code=256
2017-07-06 23:47:36 +0000 [warn]: fluent/supervisor.rb:357:supervise: process died within 1 second. exit.

gem install fluent-plugin-named_pipe looking for mkfifo dependency

Trying to install this using gem on a Windows machine with ruby 3.1.0. But getting error with mkfifo. It is already available from ruby > 2.3.0.

`gem install fluent-plugin-named_pipe -v 0.2.0
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing fluent-plugin-named_pipe:
ERROR: Failed to build gem native extension.

current directory: C:/ruby31/lib/ruby/gems/3.1.0/gems/mkfifo-0.1.1/ext

C:/ruby31/bin/ruby.exe -I C:/ruby31/lib/ruby/3.1.0 -r ./siteconf20221012-7252-ux1epl.rb extconf.rb
creating Makefile

current directory: C:/ruby31/lib/ruby/gems/3.1.0/gems/mkfifo-0.1.1/ext
make DESTDIR= clean

current directory: C:/ruby31/lib/ruby/gems/3.1.0/gems/mkfifo-0.1.1/ext
make DESTDIR=
generating mkfifo-x64-mingw-ucrt.def
compiling mkfifo.c
mkfifo.c: In function 'rb_cFile_mkfifo':
mkfifo.c:30:9: warning: implicit declaration of function 'mkfifo' [-Wimplicit-function-declaration]
30 | if (mkfifo(RSTRING_PTR(name), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) < 0) {
| ^~~~~~
linking shared-object mkfifo.so
C:/ruby31/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: mkfifo.o:mkfifo.c:(.
text+0x82): undefined reference to `mkfifo'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:263: mkfifo.so] Error 1

make failed, exit code 2

Gem files will remain installed in C:/ruby31/lib/ruby/gems/3.1.0/gems/mkfifo-0.1.1 for inspection.
Results logged to C:/ruby31/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/mkfifo-0.1.1/gem_make.out`

Is there a way to remove this dependency on mkfifo? Or any other solution you propose?

ruby-fifo gem is not maintained

We should create our own gem.
Please notice that ruby-fifo does not note its license, so we should not re-use codes of it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.