# Indexing through logstash

**URL:** https://discuss.elastic.co/t/indexing-through-logstash/63353
**Category:** Logstash
**Created:** [October 19, 2016, 8:01am UTC](https://discuss.elastic.co/t/indexing-through-logstash/63353 "2016-10-19T08:01:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sanju1323](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sanju1323](https://discuss.elastic.co/u/sanju1323)
#### Post date: [October 19, 2016, 8:01am UTC](https://discuss.elastic.co/t/indexing-through-logstash/63353/1 "2016-10-19T08:01:09Z")

</div>

Hi,

I'm using the following config file to index the data.

```
input {
jdbc {
jdbc_driver_library => "E:/softwares/sqljdbc-1.2.0.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://161.10.2.13;databaseName=jaggu"
jdbc_user => "user"
jdbc_password => "user"

statement => "Select * from ism where startDate between '2016-05-01' and '2016-06-01'"

jdbc_paging_enabled => "true"
jdbc_page_size => "100000"
}
}
filter{
grok {
    patterns_dir => "E:/softwares/ElasticSearch/logstash-1.3.3-flatjar/patterns"
    match => ["startDate", "%{YEAR:al_year}-%{MONTHNUM:al_month}-%{MONTHDAY:al_monthday} %{TIME:al_time}"]
    add_field => ["LogTime", "%{al_year}-%{al_month}-%{al_monthday} %{al_time}"]
}
date 
{
    match => ["LogTime", "YYYY-MM-dd HH:mm:ss.SSS"] 
}
}
output {
stdout {
codec => "json"
}
elasticsearch { 
hosts => "localhost:9200"
index => "revenue"
document_type => "revenue"	
}
}

```

When I index the data from SQL Server using this config file, one or two records are missing in the index (Lets say, there are 2000 records in SQL Server table. If I index that table, only 1999/1998 records are being indexed). Tried indexing multiple times but the result is same. Is there anything that I should change in the config file?  
Please suggest

Regards,  
Sanjay Reddy

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 20, 2016, 1:51am UTC](https://discuss.elastic.co/t/indexing-through-logstash/63353/2 "2016-10-20T01:51:26Z")

</div>

Do you get everything in `stdout`? Is there anything in the logs?

---

<div class="post-metadata">

### Author: ![sanju1323](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sanju1323](https://discuss.elastic.co/u/sanju1323)
#### Post date: [October 21, 2016, 10:30am UTC](https://discuss.elastic.co/t/indexing-through-logstash/63353/3 "2016-10-21T10:30:44Z")

</div>

thanks @warkolm  
I have checked the log file. There was some conversion error. Because of that Some of the records are not indexed.  
Thanks much for the reply 🙂

---

<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: [July 6, 2017, 4:33am UTC](https://discuss.elastic.co/t/indexing-through-logstash/63353/4 "2017-07-06T04:33:17Z")

</div>


