logspout-gelf icon indicating copy to clipboard operation
logspout-gelf copied to clipboard

tcp

Open morgoved opened this issue 7 years ago • 0 comments

i can't send to tcp, i have graylog in cluster and I can't balance udp connection. I get the following error.

[email protected] | # routes : [email protected] | # ADAPTER ADDRESS CONTAINERS SOURCES OPTIONS [email protected] | # multiline+gelf 172.17.70.150:12201 map[] [email protected] | 2018/10/16 12:05:59 Graylog: write udp 172.19.0.3:34834->172.17.70.150:12201: write: connection refused [email protected] | 2018/10/16 12:05:59 Graylog: write udp 172.19.0.3:34834->172.17.70.150:12201: write: connection refused

I tried it change udp to tcp in gelf.go, but it did not bring results.

Could you tell me how to solve my problem?

docker-compose.yml

version: '3' services: logspout: build: ./ image: reg.efp:5000/logspout:gelf volumes: - /etc/hostname:/etc/host_hostname:ro - /var/run/docker.sock:/var/run/docker.sock environment: - LOGSPOUT_MULTILINE=true ports: - "17000:80" command: multiline+gelf://172.17.70.150:12201 restart: unless-stopped deploy: mode: global

Dockerfile

WORKDIR /go/src/github.com/gliderlabs/logspout FROM golang:alpine as build MAINTAINER [email protected] LABEL maintainer "[email protected]" ENV LOGSPOUT_VERSION=3.2.5 ENV LOGSPOUT_DOWNLOAD_SHA256=22a8f1fbce7298c16b6ab7401216d8bf4c3b7dc710889371d434a123d5d4d0a2 RUN mkdir -p /go/src WORKDIR /go/src VOLUME /mnt/routes EXPOSE 80

RUN apk --no-cache add curl git gcc musl-dev RUN curl -fSL -o logspout.tar.gz "https://github.com/gliderlabs/logspout/archive/v${LOGSPOUT_VERSION}.tar.gz"
&& echo "$LOGSPOUT_DOWNLOAD_SHA256 *logspout.tar.gz" | sha256sum -c -
&& tar -zxvf logspout.tar.gz
&& rm logspout.tar.gz
&& mkdir -p /go/src/github.com/gliderlabs/
&& mv logspout-${LOGSPOUT_VERSION} /go/src/github.com/gliderlabs/logspout

WORKDIR /go/src/github.com/gliderlabs/logspout RUN echo 'import ( _ "github.com/morgoved/logspout-gelf-tcp-fork" )' >> /go/src/github.com/gliderlabs/logspout/modules.go RUN go get -d -v ./... RUN go build -v -ldflags "-X main.Version=$(cat VERSION)" -o ./bin/logspout

FROM alpine:latest COPY --from=build /go/src/github.com/gliderlabs/logspout/bin/logspout /go/bin/logspout ENTRYPOINT ["/go/bin/logspout"]

morgoved avatar Oct 16 '18 12:10 morgoved