# Send file with logstash output plugin

**URL:** <https://discuss.elastic.co/t/send-file-with-logstash-output-plugin/199265>\
**Category:** Logstash\
**Created:** [September 12, 2019, 2:00pm UTC](https://discuss.elastic.co/t/send-file-with-logstash-output-plugin/199265 "2019-09-12T14:00:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk2](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elk2](https://discuss.elastic.co/u/elk2)\
**Post date:** [September 12, 2019, 2:00pm UTC](https://discuss.elastic.co/t/send-file-with-logstash-output-plugin/199265/1 "2019-09-12T14:00:26Z")

</div>

I'm trying to send a .json file from a pc to another with logstash.  
This is the configuration of sender:

```
input {

file {
    path => "/var/log/event.json"
    sincedb_path => "/var/log/sincedb/.sincedb_test"
    start_position => "beginning"
    codec => json
  }

}

filter {
}

output {

        tcp {
           host => "192.168.0.2"
           port => "1111"
        }
}

```

And this is the receiver:

```
input {
  tcp {
    id => "id_1"
    port => 1111

  }
}

filter {
}
output {
  file {
   path => "/var/log/event.json"
 }}

```

With the above configuration no file are written on path "/var/log/"  
I disabled both firewall and with tcpdump I see packets sent and received.

Furthermore if in the receiver machine I configure a second config file with different input file and output to elasticsearch , a /var/log/event.json is created with content data of the input of the second config file.

---

<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 10, 2019, 2:00pm UTC](https://discuss.elastic.co/t/send-file-with-logstash-output-plugin/199265/2 "2019-10-10T14:00:28Z")

</div>

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