# Sending to data to Elasticsearch using logstash?

**URL:** <https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354>\
**Category:** Logstash\
**Created:** [February 24, 2017, 6:06am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354 "2017-02-24T06:06:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 24, 2017, 6:06am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/1 "2017-02-24T06:06:18Z")

</div>

Hi  
ES 2.4.1  
Logstash 2.4.0

I am sending data to elasticsearch from local to create a index "pica".I used the below conf file.

```
input {
      file {
        path => "C:\Output\Receive.txt"
        start_position => "beginning"
        codec => json_lines
       
      }
    }
    output {
      elasticsearch {
        hosts => "http://localhost:9200/"
        index => "pica"
    }
    stdout{
    codec => rubydebug
    }
    }

```

I couldn't see any output in either logstash prompt or in elasticsearch cluster.  
When i seen the .sincedb file it has the following code:  
`612384816-350504-4325376 0 0 3804`

May i know what's the problem here?

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 24, 2017, 7:26am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/2 "2017-02-24T07:26:39Z")

</div>

How big is Receive.txt? Is it a static file or is someone/something appending data to it?

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 24, 2017, 7:28am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/3 "2017-02-24T07:28:54Z")

</div>

It is a text file of size 4kb . It is not a static file. it is just a text file

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 24, 2017, 7:36am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/4 "2017-02-24T07:36:26Z")

</div>

Logstash is waiting for more data. Shut down Logstash, delete the sincedb file, then fire it up again.

Side note: I didn't ask for an approximation of the file size. I wanted to know _exactly_ how big the file was, in bytes. That stuff matters.

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 24, 2017, 7:42am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/5 "2017-02-24T07:42:09Z")

</div>

Thanks for fast response..  
I tried more than 5 times , every time deleting sincedb file but the problem remains..

> [@magnusbaeck](#):
>
> Side note: I didn't ask for an approximation of the file size. I wanted to know exactly how big the file was, in bytes. That stuff matters.

size : 3,804 bytes  
size on disk: 4,096 bytes

Can we please say whether my conf file code is good? Or need any other correction in that?

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 27, 2017, 6:36am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/6 "2017-02-27T06:36:45Z")

</div>

You can increase the logging verbosity and examine the resulting logs to better see what's going on.

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 27, 2017, 7:07am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/7 "2017-02-27T07:07:22Z")

</div>

Thanks ..  
But i worked fine when i removed codec =\> json\_lines in input configuration..

---

<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:** [March 27, 2017, 7:07am UTC](https://discuss.elastic.co/t/sending-to-data-to-elasticsearch-using-logstash/76354/8 "2017-03-27T07:07:36Z")

</div>

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