# Manually send json object to beats listener

**URL:** <https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908>\
**Category:** Logstash\
**Created:** [August 6, 2019, 2:49am UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908 "2019-08-06T02:49:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnet/32/25982_2.png) [@nnet](https://discuss.elastic.co/u/nnet)\
**Post date:** [August 6, 2019, 2:49am UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908/1 "2019-08-06T02:49:30Z")

</div>

Hi, I have a working beats listener configured in logstash, and a filebeats prospector shipping json data from a log file.

```
input {
  beats {
    port => 5047
    include_codec_tag => false
  }
}

```

I want to test arbitrary json object parsing by manually sending data to the beats listener for processing by logstash, however my attempts to use `curl` and `nc` fail with errors  
`Ncat: Connection reset by peer.`  
or  
`curl: (56) Recv failure: Connection reset by peer`

Is there a way to manually send json data to the beats listener?

---

<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:** [August 6, 2019, 12:07pm UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908/2 "2019-08-06T12:07:38Z")

</div>

> [@nnet](#):
>
> Is there a way to manually send json data to the beats listener?

The beats input parses data in the lumberjack protocol. The easiest way to write data in that format is to have filebeat do it.

---

<div class="post-metadata">

**Author:** ![nnet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnet/32/25982_2.png) [@nnet](https://discuss.elastic.co/u/nnet)\
**Post date:** [August 6, 2019, 3:18pm UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908/3 "2019-08-06T15:18:11Z")

</div>

Thanks for responding and explaining the protocol beats uses. So its possible then to manually send data to the listener?

---

<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:** [August 6, 2019, 3:30pm UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908/4 "2019-08-06T15:30:41Z")

</div>

I would configure filebeat to read a file and then just append the JSON objects to the file.

---

<div class="post-metadata">

**Author:** ![nnet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnet/32/25982_2.png) [@nnet](https://discuss.elastic.co/u/nnet)\
**Post date:** [August 6, 2019, 6:57pm UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908/5 "2019-08-06T18:57:40Z")

</div>

While this works, I was hoping for a network based means, thanks for your help, this will have to do 🙂

---

<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:** [September 3, 2019, 6:57pm UTC](https://discuss.elastic.co/t/manually-send-json-object-to-beats-listener/193908/6 "2019-09-03T18:57:41Z")

</div>

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