Code Monkey home page Code Monkey logo

logspout-fluentd's Introduction

logspout-fluentd

Logspout module for forwarding logs to fluentd.

Usage

This module works by acting as a fluentd forwarder, sending messages with a tag name docker.{Hostname}, where {Hostname} is the .

Configure Logspout to receive forwarded messages, something like this:

<source>
  type forward
  port 24224
  bind 0.0.0.0
</source>

<match docker.**>
  # Handle messages here.
</match>

logspout-fluentd's People

Contributors

ndhoule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logspout-fluentd's Issues

logspout-fluentd fails to reconnect if it loses connectivity with fluentd

We're seeing issues with logspout-fluentd where connectivity is never re-established with fluentd if it is lost, what we see instead is continuous logging of broken pipe messages in stderr, which causes a large spike in CPU activity on that docker host:

2018/01/09 15:07:31 fluentd-adapter: write tcp 127.0.0.1:38830->127.0.0.1:24224: write: broken pipe

We're running logspout in a container on each of our Rancher hosts talking to a separate container running fluentd. This issue requires us to restart the logspout container to re-establish connection. I saw a similar issue raised for the syslog logspout adapter: gliderlabs/logspout#107 in which they raised gliderlabs/logspout#291 to resolve the issue by adding a configurable number of reconnection attempts.

We much prefer the richness of the logging using logspout-fluentd over syslog, so would it be possible to implement a similar fix to the fluentd adapter?

Adding more metadata to forward logs

Hi!
Thanks for this plugin, my team is using it as part of our logging pipeline

I was wondering if there was a way to add more metadata to log records before sending them to fluentd?
For example, container labels, or any container/service/stack/node information available from the API.
Currently, only timestamp, log, container_id and container_name fields seem to be included.
Maybe this is something that can be addressed "upstream" in the logspout project directly?
I've created an issue there too: gliderlabs/logspout#483.

If doing so would require modifying the code, I'm open to trying my hands at it eventually(I haven't coded in go yet, but it seems like a nice language), and submitting a PR, if I can get some pointers on what would need to be done.

Thanks again!

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.