# Graylog not receiving messages sent with logstash gelf output, both running on Docker

**URL:** <https://discuss.elastic.co/t/graylog-not-receiving-messages-sent-with-logstash-gelf-output-both-running-on-docker/173199>\
**Category:** Logstash\
**Created:** [March 20, 2019, 5:49pm UTC](https://discuss.elastic.co/t/graylog-not-receiving-messages-sent-with-logstash-gelf-output-both-running-on-docker/173199 "2019-03-20T17:49:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![strike](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@strike](https://discuss.elastic.co/u/strike)\
**Post date:** [March 20, 2019, 5:49pm UTC](https://discuss.elastic.co/t/graylog-not-receiving-messages-sent-with-logstash-gelf-output-both-running-on-docker/173199/1 "2019-03-20T17:49:14Z")

</div>

I have Logastash, Graylog, Elasticsearch and Mongodb each one running as docker service (I use docker-compose). I use logstash jdbc input plugin to retreive the logs from database table and gelf output to send logs to graylog. I am able to get the logs to logstash and print them to stdout, but fail to send them to graylog. Below is my logstash conf and graylog's udp input.

```auto
 input {
  jdbc {
    jdbc_driver_library => "/opt/mysql-connector-java-8.0.13.jar"
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://mariadb:3306/${DB_DATABASE}"
    jdbc_user => "${DB_USERNAME}"
    jdbc_password => "${DB_PASSWORD}" 
    statement => "SELECT * FROM mdl_logstore_standard_log WHERE id > :sql_last_value ORDER BY id"
    use_column_value => true
    tracking_column => "id"
    schedule => "*/5 * * * *" ## run every 5 minutes
  }
}

filter {
  mutate {
    add_field => { "short_message" => "moodle GELF message" }
  }
}

output {
  stdout {
    id => "moodle_stdout"
    codec => json
  }
  gelf {
    id => "moodle_gelf_output"
    host => "logging_system_graylog_1"
    port => 12201
  }
}

```

I set the host to be the graylog's container name, since that is the address I can ping from inside the logstash's container. But this host and bind\_address part is that I'm most unsure about.

```auto
bind_address: logging_system_graylog_1
decompress_size_limit: 8388608
override_source: <empty>
port: 12201
recv_buffer_size: 262144

```

  
I do not have any error messages in logstash's container. And the only one I have in graylog's container is the following. 

```auto
WARN : org.graylog2.plugin.inputs.transports.NettyTransport - receiveBufferSize (SO_RCVBUF) for input GELFUDPInput{title=moodle_gelf, type=org.graylog2.inputs.gelf.udp.GELFUDPInput, nodeId=e6019562-4a01-471e-9373-15cce0410134} should be 262144 but is 212992.

```

  
graylog image: graylog/graylog:2.5  
logstash image: logstash/logstash:6.5.4  
  
Any help is much appreciated!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 17, 2019, 5:49pm UTC](https://discuss.elastic.co/t/graylog-not-receiving-messages-sent-with-logstash-gelf-output-both-running-on-docker/173199/2 "2019-04-17T17:49:22Z")

</div>

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