# How can I send logs from file to Elasticsearch using Logstash between two separated servers?

**URL:** <https://discuss.elastic.co/t/how-can-i-send-logs-from-file-to-elasticsearch-using-logstash-between-two-separated-servers/139521>\
**Category:** Logstash\
**Created:** [July 11, 2018, 9:07am UTC](https://discuss.elastic.co/t/how-can-i-send-logs-from-file-to-elasticsearch-using-logstash-between-two-separated-servers/139521 "2018-07-11T09:07:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/white_rabbit/32/46888_2.png) [@white\_rabbit](https://discuss.elastic.co/u/white_rabbit)\
**Post date:** [July 11, 2018, 9:07am UTC](https://discuss.elastic.co/t/how-can-i-send-logs-from-file-to-elasticsearch-using-logstash-between-two-separated-servers/139521/1 "2018-07-11T09:07:51Z")

</div>

I try to send logs from `logs.csv` file to elasticsearch using Logstash. In Elasticsearch I have index logs with type log. At the moment my `logstash.conf` looks in the way shown below. Logstash seems to be configured correctly because for instance `sudo ./logstash -e 'input { stdin { } } output { stdout {} }'` works properly. Any ideas why it's not working? It adds only name of the column to elasticsearch.

```
input {
  file {
    path => "/run/shm/elastic/logstash/file"
    start_position => "beginning"
    sincedb_path => "/dev/null"
  }
}
filter {
  csv {
      columns => ["logs"]
  }

}
output {
    elasticsearch {
        hosts => "hostaddress:9200"
        index => "logs"
        document_type => "log"
    }
    stdout {}
}
```

---

<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:** [August 8, 2018, 9:07am UTC](https://discuss.elastic.co/t/how-can-i-send-logs-from-file-to-elasticsearch-using-logstash-between-two-separated-servers/139521/2 "2018-08-08T09:07:53Z")

</div>

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