# Configuration for shipping Docker logs to a locally installed Logstash

**URL:** <https://discuss.elastic.co/t/configuration-for-shipping-docker-logs-to-a-locally-installed-logstash/315725>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [October 3, 2022, 10:27pm UTC](https://discuss.elastic.co/t/configuration-for-shipping-docker-logs-to-a-locally-installed-logstash/315725 "2022-10-03T22:27:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chma](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Chma](https://discuss.elastic.co/u/Chma)\
**Post date:** [October 3, 2022, 10:27pm UTC](https://discuss.elastic.co/t/configuration-for-shipping-docker-logs-to-a-locally-installed-logstash/315725/1 "2022-10-03T22:27:30Z")

</div>

I have my ELK deployed on an ec2 instance and a dockerized application running on a different instance. I am trying to use gelf to collect the different service logs and send to logstash. But my current configuration doesn't work.

Here's my` docker.yaml` file and my `logstash conf` file. For the `gelf address` I used the private ip of the instance where I have logstash running - is that what I should be using in this use case? What am I missing?

```auto
version: '3'
services:
  app:
    build: .
    volumes:
      - .:/app
    ports:
      - "8000:8000"
    links:
      - redis:redis
    depends_on:
      - redis
    logging:
      driver: gelf
      options:
        gelf-address: "udp://10.0.1.98:12201"
        tag: "dockerlogs"
  redis:
    image: "redis:alpine"
    expose:
      - "6379"
    logging:
      driver: gelf
      options:
        gelf-address: "udp://10.0.1.98:12201"
        tag: "redislogs"

```

This is my logstash conf:

```auto
input {
  beats {
    port => 5044
  }
  gelf {
    port:12201
    type=> "dockerLogs"
  }
}
output {
  elasticsearch {
    hosts => ["${ELK_IP}:9200"]
    index =>"logs-%{+YYYY.MM.dd}"
  }
}

```

---

<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:** [October 31, 2022, 10:28pm UTC](https://discuss.elastic.co/t/configuration-for-shipping-docker-logs-to-a-locally-installed-logstash/315725/2 "2022-10-31T22:28:24Z")

</div>

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