# How to test UDP input for logstash

**URL:** <https://discuss.elastic.co/t/how-to-test-udp-input-for-logstash/117309>\
**Category:** Logstash\
**Created:** [January 27, 2018, 2:41pm UTC](https://discuss.elastic.co/t/how-to-test-udp-input-for-logstash/117309 "2018-01-27T14:41:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![some7](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@some7](https://discuss.elastic.co/u/some7)\
**Post date:** [January 27, 2018, 2:41pm UTC](https://discuss.elastic.co/t/how-to-test-udp-input-for-logstash/117309/1 "2018-01-27T14:41:42Z")

</div>

I want to send messages into logstash listening on localhost UDP port to test that it works. I'm on linux and would like to use `ncat`, how can I do it? Maybe it's wrong but `echo test | ncat -v -u localhost 5999` has an error.

```auto
Ncat: Version 7.60 ( https://nmap.org/ncat )
Ncat: Connected to ::1:5999.
Ncat: Connection refused.

```

---

<div class="post-metadata">

**Author:** ![jpcarey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpcarey/32/46668_2.png) [@jpcarey](https://discuss.elastic.co/u/jpcarey)\
**Post date:** [January 27, 2018, 4:34pm UTC](https://discuss.elastic.co/t/how-to-test-udp-input-for-logstash/117309/2 "2018-01-27T16:34:41Z")

</div>

I think if you change from localhost to your interface's ip address, it will work. Or, set the `host` setting for the udp plugin to localhost / 127.0.0.1 / ::1.

---

<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 24, 2018, 4:34pm UTC](https://discuss.elastic.co/t/how-to-test-udp-input-for-logstash/117309/3 "2018-02-24T16:34:59Z")

</div>

Closed on February 24, 2018, 4:34pm UTC

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