# Number of lines+ real-time data from SQL Server

**URL:** <https://discuss.elastic.co/t/number-of-lines-real-time-data-from-sql-server/92394>\
**Category:** Kibana\
**Created:** [July 9, 2017, 1:49pm UTC](https://discuss.elastic.co/t/number-of-lines-real-time-data-from-sql-server/92394 "2017-07-09T13:49:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ines\_ben\_kraiem](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@ines\_ben\_kraiem](https://discuss.elastic.co/u/ines_ben_kraiem)\
**Post date:** [July 9, 2017, 1:49pm UTC](https://discuss.elastic.co/t/number-of-lines-real-time-data-from-sql-server/92394/1 "2017-07-09T13:49:37Z")

</div>

Hi,  
I retrieved from the database SQL SERVER 300 million lines with logstash and elasticsearch, now I want to visualize this data with kibana. So how to know the number of rows recorvred by kibana and how can i activate the real-time addition of the new data inserted in the database .

 ![](https://us1.discourse-cdn.com/elastic/original/3X/9/1/91d4a4e52dcbbacef3bdb07479b5d54306f71775.png)

Best regards

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [July 10, 2017, 2:55pm UTC](https://discuss.elastic.co/t/number-of-lines-real-time-data-from-sql-server/92394/2 "2017-07-10T14:55:38Z")

</div>

The fastest way to get the total number of rows in a kibana index, you can use a small query in dev tools:

```auto
GET metricbeat-*/_search
{
  "query": {
    "match_all": {}
  },
  "size": 0
}

```

Since size is 0, it won't return the actual data. If you want the actual data you can expand your time range in discover, but the search may take more time to return.

See the total hit count in the response:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/9/e/9e1861a4c224aeacd1b76a373625c05cedc38e86.png)

See "hits" in the upper left corner. The number is larger in this screenshot because my data is continually being indexed.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/0/4/044634f4f0a554443be7458addc2251704853b2b.png)

To visualize this data, you should explore the Visualize tab where you can create different types of charts, depending on your needs/data format.

As far as auto indexing data from SQL Server into Elasticsearch, you may need to find an external plugin to do so:  
[https://github.com/logstash-plugins/logstash-input-jdbc](https://github.com/logstash-plugins/logstash-input-jdbc) may do the trick. Looks like [this link](https://www.pluralsight.com/blog/it-ops/elasticsearch-and-sql-server) may have some useful information as well.

---

<div class="post-metadata">

**Author:** ![ines\_ben\_kraiem](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@ines\_ben\_kraiem](https://discuss.elastic.co/u/ines_ben_kraiem)\
**Post date:** [July 12, 2017, 3:44pm UTC](https://discuss.elastic.co/t/number-of-lines-real-time-data-from-sql-server/92394/3 "2017-07-12T15:44:16Z")

</div>

Thanks for your replay  
In sql server I created this request (SELECT \* FROM TRENDTABLE1 WHERE name LIKE '%AEP%' ) and I get 8000 lines but when i insert this request in file.conf and search in kibana i got this result

 ![](https://us1.discourse-cdn.com/elastic/original/3X/d/e/de98060f39c60beec46fe86cf482139eae00004e.png)  
 ![](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c723c50f457c5bf093fe836b5bad004d969fe726.png)

---

<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 9, 2017, 3:54pm UTC](https://discuss.elastic.co/t/number-of-lines-real-time-data-from-sql-server/92394/4 "2017-08-09T15:54:25Z")

</div>

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