Giter VIP home page Giter VIP logo

Comments (10)

zot24 avatar zot24 commented on September 21, 2024

I'll be interested in this feature as well as, but be able to choose between tcp/upd will be a better idea than change logstast.go file, like on a config file or from the modules.go file like:

import (
  _ "github.com/gliderlabs/logspout/transports/tcp"
  _ "github.com/looplab/logspout-logstash/transports/tcp"
)

or

import (
  _ "github.com/gliderlabs/logspout/transports/udp"
  _ "github.com/looplab/logspout-logstash/transports/udp"
)

from logspout-logstash.

jmreicha avatar jmreicha commented on September 21, 2024

+1

from logspout-logstash.

rchicoli avatar rchicoli commented on September 21, 2024

This should be solved with this PR
#29

from logspout-logstash.

sfriedel avatar sfriedel commented on September 21, 2024

Actually it doesn't need a change. You can just use logstash+tcp://... instead of logstash://... and it should work.

For it to work your logspout modules.go also has to include:

import (
  _ "github.com/gliderlabs/logspout/transports/tcp"
)

from logspout-logstash.

rchicoli avatar rchicoli commented on September 21, 2024

hey @sfriedel, it didn't work for me like you said and to be honest, it doesn't make sense either to start a transport with udp and type tcp in the protocol.

root@9b5c57baa541:/# netstat -putan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 :::5003                 :::*                    LISTEN      -

$ docker run --rm --volume=/var/run/docker.sock:/var/run/docker.sock -e ROUTE_URIS=logstash+tcp://172.17.0.3:5003 test:1.0

# logspout v3.1-custom by gliderlabs
# adapters: raw tcp udp logstash
# options : persist:/mnt/routes
# jobs    : pump routes http[]:80
# routes  :
#   ADAPTER     ADDRESS         CONTAINERS      SOURCES OPTIONS
#   logstash+tcp172.17.0.3:5003                         map[]

As soon as you try to send some log information, the connection breaks:

2016/08/09 20:12:39 logstash:write tcp 172.17.0.5:44234->172.17.0.3:5003: write: broken pipe

from logspout-logstash.

sfriedel avatar sfriedel commented on September 21, 2024

hey @rchicoli, i don't know exactly why it doesn't work for you that way. I'm currently using it with logstash+tls:// without problems but during testing i was using logstash+tcp://. Did you change your logstash configuration to enable the tcp input?

to be honest, it doesn't make sense either to start a transport with udp and type tcp in the protocol.

I'm not sure i understand completely. If you mean the udp that's passed to route.AdapterTransport then that is the default transport that logspout will use if the url scheme doesn't specify one (so logstash:// is actually logstash+udp:// internally).

from logspout-logstash.

rchicoli avatar rchicoli commented on September 21, 2024

ok @sfriedel thx for the reply.
No idea why it didn't work for me.
Oh well, I will give another try then.

from logspout-logstash.

rchicoli avatar rchicoli commented on September 21, 2024

hey @sfriedel , I tried again, somehow I got it working, like you said so.. maybe there was some old cache image on my pc, after deleting everything and rebuilding I can confirm, it does work!

from logspout-logstash.

rchicoli avatar rchicoli commented on September 21, 2024

this can be closed, thx to @sfriedel
I've updated the README.

from logspout-logstash.

maxekman avatar maxekman commented on September 21, 2024

Thanks for sorting this out, fixed in #29.

from logspout-logstash.

Related Issues (20)

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.