# Logstash configuration

**URL:** https://discuss.elastic.co/t/logstash-configuration/322736
**Category:** Logstash
**Tags:** docker
**Created:** [January 9, 2023, 12:32pm UTC](https://discuss.elastic.co/t/logstash-configuration/322736 "2023-01-09T12:32:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![themainguru](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/themainguru/32/115716_2.png) [@themainguru](https://discuss.elastic.co/u/themainguru)
#### Post date: [January 9, 2023, 12:32pm UTC](https://discuss.elastic.co/t/logstash-configuration/322736/1 "2023-01-09T12:32:35Z")

</div>

Hello All,

I am using a docker image of sebp/elk. I have setup an EC2 Ubuntu machine. This is a vanilla installation.

I have a rails app on another server. I want to push logs from rails to logstash. I am not sure where to make this configuration. I created a new config file which looks like this

```auto
input {
    udp {
		type => "rails logs udp"
        port => 5228
        # start_position => "beginning"
        # sincedb_path => "/dev/null"
        codec => json {
            target => "[document]"
        }
    }
}

output {
	stdout {
    	codec => rubydebug
  	}
    elasticsearch {
			hosts => "http://localhost:9200"
			index => "development_log"
    }
}

```

Can you please help me out. BTW I do get curl response for 5601 and webpage of kibana on 9200 port.

My app is using gem logstashlogger via which I am trying to send the data (tcp).

It's that, I want to hook up my app with this ELK stack .

Thanks

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [January 9, 2023, 10:59pm UTC](https://discuss.elastic.co/t/logstash-configuration/322736/2 "2023-01-09T22:59:24Z")

</div>

Hi, @themainguru Welcome to the community!

Well since you are using sebp/elk docker image perhaps look at their referenced documents [here](https://elk-docker.readthedocs.io/) and [here](https://elk-docker.readthedocs.io/#updating-logstash-configuration)

> [@themainguru](#):
>
> My app is using gem logstashlogger via which I am trying to send the data (tcp).

BTW I notice here you said TCP and in your config you have UDP...

> [@themainguru](#):
>
> ` udp {`

---

<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: [February 6, 2023, 10:59pm UTC](https://discuss.elastic.co/t/logstash-configuration/322736/3 "2023-02-06T22:59:26Z")

</div>

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