Send file with logstash output plugin

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.

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