What do the multiple ports mean while running graylog through docker?

I followed the steps mentioned in the documentation for installing graylog through docker.

docker run --name mongo -d mongo:3

docker run --name elasticsearch \
    -e "http.host=" \
    -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
    -d docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2

 docker run --link mongo --link elasticsearch \
    -p 9000:9000 -p 12201:12201 -p 1514:1514 -p 5046:5046 \
    -d graylog/graylog:3.1

What do all these ports mean?

I created a GELF UDP input in graylog with bind address and port 5046
I added the following log4net AsyncGelfUdpAppender appender in my .Net project.

<appender name="AsyncGelfUdpAppender" type="Gelf4Net.Appender.AsyncGelfUdpAppender, Gelf4Net">
    <!-- Number of log lines to buffer for async send. Defaults to 10-->
    <bufferSize value="20" />
    <!-- Number of tasks to use for the async appender. 0 or fewer indicates one task per processor-->
    <threads value="2" />
    <remoteAddress value="" />
    <remotePort value="5046" />
    <layout type="Gelf4Net.Layout.GelfLayout, Gelf4Net">
        <param name="AdditionalFields" value="app:AsyncUdpAppender,version:1.0,Environment:Dev,Level:%level" />
        <param name="Facility" value="RandomPhrases" />
        <param name="IncludeLocationInformation" value="true" />
        <param name="SendTimeStampAsString" value="true"/>

But no messages are getting logged to graylog.

Deploying via docker you just expose ports you use in your app, in case of docker it really depends ports your inputs listen on, in this case you need 9000 for graylog’s web interface and REST API, 1514 is probably syslog (514) upped by 1000 because non-root user can’t use ports smaller than 1024 (?), you don’t really need it if you don’t use corresponding input in graylog, 5046 is the port you need for your input, additionally to expose udp port you need to append /udp, in your case it should be -p 5046:5046/udp

I did try this.
docker run --link mongo --link elasticsearch
-p 9000:9000 -p 12201:12201 -p 5046:5046/udp
-d graylog/graylog:3.1

What should the bind address be when I create an input in Graylog? Right now, it’s and still with this configuration, I see no messages in Graylog when I log through my application.

What do you think should be the remoteAddress and remotePort value if I use the docker command above?

weird, it should work, maybe try external ip address of the machine you run dockerized graylog on

Do you think these values are correct?

<remoteAddress value="" />
    <remotePort value="5046" />

And should I change the bind address to from and port from 5046 to something else when creating a GELF UDP input?

no, should be ok in input config, i was suggesting using non local ip address in remoteAddress, like ip of your machine instead of

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.