# How to specify subpath to logstash host in filebeat.yml

**URL:** <https://discuss.elastic.co/t/how-to-specify-subpath-to-logstash-host-in-filebeat-yml/262501>\
**Category:** Logstash\
**Created:** [January 28, 2021, 1:12pm UTC](https://discuss.elastic.co/t/how-to-specify-subpath-to-logstash-host-in-filebeat-yml/262501 "2021-01-28T13:12:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeijlar](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@eeijlar](https://discuss.elastic.co/u/eeijlar)\
**Post date:** [January 28, 2021, 1:12pm UTC](https://discuss.elastic.co/t/how-to-specify-subpath-to-logstash-host-in-filebeat-yml/262501/1 "2021-01-28T13:12:24Z")

</div>

I am trying to ship logs to logstash from filebeat.

With reference to:

> **[Configure the Logstash output | Filebeat Reference \[7.10\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/logstash-output.html)**

In the filebeat.yml, it says to use this for the host:

```
output.logstash:
  hosts: ["127.0.0.1:5044"]

```

My logstash URL has /logstash appending onto it:

```
  # The Logstash hosts
  hosts: ["10.1.103.92:30090/logstash/"]

```

If I put this in for the host I get the following error:

`2021-01-28T13:04:37.534Z ERROR [publisher_pipeline_output] pipeline/output.go:154 Failed to connect to backoff(async(tcp://10.1.103.92:30090/logstash/)): dial tcp: lookup tcp/30090/logstash/: Servname not supported for ai_socktype`

I think it doesn't like the /logstash part of the url. Is there any way to specify that?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 28, 2021, 4:21pm UTC](https://discuss.elastic.co/t/how-to-specify-subpath-to-logstash-host-in-filebeat-yml/262501/2 "2021-01-28T16:21:22Z")

</div>

> [@eeijlar](#):
>
> Is there any way to specify that?

Why would you want to do that?

---

<div class="post-metadata">

**Author:** ![eeijlar](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@eeijlar](https://discuss.elastic.co/u/eeijlar)\
**Post date:** [January 28, 2021, 4:24pm UTC](https://discuss.elastic.co/t/how-to-specify-subpath-to-logstash-host-in-filebeat-yml/262501/3 "2021-01-28T16:24:44Z")

</div>

I don't have a choice, it's the way the url is presented from kubernetes. Traffic is routed into the appropriate service using gloo, which distinguishes the various services based on the path it finds in the url, so if the url contains logstash then it knows to route it to the logstash service. I am not sure if I can change it, it's how the different services are presented for example:

```auto
10.1.103.92:30090/elasticsearch/
10.1.103.92:30090/kibana/
10.1.103.92:30090/logstash/

```

Elasticsearch supports this with the path option:

```auto
output.elasticsearch:
  enabled: true
  # Array of hosts to connect to.
  hosts: ["10.1.103.92:30090"]
  path: "/elasticsearch/"

```

I just thought logstash might have something similar, but it doesn't look like it.

---

<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 25, 2021, 4:24pm UTC](https://discuss.elastic.co/t/how-to-specify-subpath-to-logstash-host-in-filebeat-yml/262501/4 "2021-02-25T16:24:48Z")

</div>

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