# Index not returning results - ELK - Can Index creation be automated?

**URL:** <https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497>\
**Category:** Logstash\
**Created:** [September 14, 2016, 11:45am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497 "2016-09-14T11:45:32Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 14, 2016, 11:45am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/1 "2016-09-14T11:45:32Z")

</div>

Hey users  
Been trying to figure out below issue but not successful. I created an index to match a data pattern in elasticsearch - but not fetching results when i discover

Results are displaying for default logstash-\* pattern. What am i missing here?  
Earlier logstash version created index automatically. Can index creation be automated rather than end users use Postman plugin to create indexes ?

Data -

{  
"message" =\> "{"message":"2016-07-04T02:34:37.642-0700: 505452.911: [GC (Allocation Failure) [PSYoungGen: 340349K-\>4283K(342016K)] 754917K-\>418851K(1339904K), 0.0130968 secs] [Times: user=0.05 sys=0.00, real=0.01 secs] ","@version":"1","@timestamp":"2016-07-04T09:34:38.098Z","host":"SERVER","path":"C:/instances/default/logs/gc.log","type":"Server.gc","environment":"DEVELOPMENT"}",  
"@version" =\> "1",  
"@timestamp" =\> "2016-07-04T09:34:38.145Z",  
"application" =\> "Server",  
"dimension" =\> "JVM Garbage Collection",  
"timestamp" =\> "2016-07-04T02:34:37.642-0700",  
"elapse" =\> 505452.911,  
"gctype" =\> "GC",  
"gctext" =\> "(Allocation Failure)",  
"newbefore" =\> 340349,  
"newafter" =\> 4283,  
"newmax" =\> 342016,  
"heapbefore" =\> 754917,  
"heapafter" =\> 418851,  
"heapmax" =\> 1339904,  
"gctime" =\> 0.0130968  
}

Index created

{  
"mappings": {  
"default": {  
"properties": {  
"message": {  
"type": "string"  
},  
"@version": {  
"type": "string", "index" : "not\_analyzed"  
},  
"@timestamp": {  
"type": "date",  
"format": "strict\_date\_optional\_time||epoch\_millis"  
},  
"application": {  
"type": "string", "index" : "not\_analyzed"  
},  
"dimension": {  
"type": "string", "index" : "not\_analyzed"  
},  
"timestamp": {  
"type": "date",  
"format": "strict\_date\_optional\_time||epoch\_millis"  
},  
"elapse": {  
"type": "double", "index" : "not\_analyzed"  
},  
"gctype": {  
"type": "string", "index" : "not\_analyzed"  
},  
"gctext": {  
"type": "string", "index" : "not\_analyzed"  
},  
"newbefore": {  
"type": "long"  
},  
"newafter": {  
"type": "long"  
},  
"newmax": {  
"type": "long"  
},  
"heapbefore": {  
"type": "long"  
},  
"heapafter": {  
"type": "long"  
},  
"heapmax": {  
"type": "long"  
},  
"gctime": {  
"type": "double", "index" : "not\_analyzed"  
}  
}  
}  
}  
}

Create the index in elastic search through postman plugin  
When i created the index in Kibana and did Discover - It states "No results found"

---

<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:** [September 14, 2016, 11:50am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/2 "2016-09-14T11:50:53Z")

</div>

> Earlier logstash version created index automatically.

That hasn't changed in recent versions. Well, it's actually ES that creates the indexes as needed.

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 14, 2016, 12:09pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/3 "2016-09-14T12:09:49Z")

</div>

Hi Magnus

You are right. I created the index in ES and then i have to Configure that index in Kibana.

When i discover - It states No results returned

Regards  
Vinay

---

<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:** [September 14, 2016, 12:45pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/4 "2016-09-14T12:45:12Z")

</div>

Never mind Kibana for now. Does the index exist? Does it contain any documents?

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 14, 2016, 1:15pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/5 "2016-09-14T13:15:37Z")

</div>

The index exists now. I created the index in elastic search and visible in [http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v)

But it does not contain any documents. You can refer my post for index created

Regards  
Vinay

---

<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:** [September 14, 2016, 1:17pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/6 "2016-09-14T13:17:14Z")

</div>

Is Logstash having problems posting documents to the index? The Logstash log should tell you. Is Logstash even processing any events, i.e. are your inputs working correctly?

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 14, 2016, 1:21pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/7 "2016-09-14T13:21:06Z")

</div>

Yes magnus  
My inputs are working correctly i dont see any errors in logstash.  
The posted documents reflects correctly in default index logstash-\*  
It even reflects correctly in daily log index logstash-2016.09.14. When i search in daily log index it does shows the documents which i posted.

But the newly created index does not fetch any results.

Regards  
Vinay

---

<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:** [September 14, 2016, 1:25pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/8 "2016-09-14T13:25:57Z")

</div>

What does your configuration look like?

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 14, 2016, 1:27pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/9 "2016-09-14T13:27:43Z")

</div>

OS - Windows server 2012  
Elastic search 2.1.1  
Logstash 2.3.4  
Kibana 4.3.1  
ActiveMQ for Message provider

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 14, 2016, 1:28pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/10 "2016-09-14T13:28:54Z")

</div>

Technically i dont see any issue (data types, mappings etc) with the index which i have created. Please check and confirm

---

<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:** [September 14, 2016, 1:47pm UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/11 "2016-09-14T13:47:20Z")

</div>

Your Logstash configuration. What's in your Logstash configuration file(s)?

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 20, 2016, 10:17am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/12 "2016-09-20T10:17:21Z")

</div>

Hi magnus  
Got delayed in reply.  
Please find below the logstash configuration files  
Shipper and Indexer in github repo

> **[kvopencode/elkrepo](https://github.com/kvopencode/elkrepo)**
>
> Contribute to elkrepo development by creating an account on GitHub.

Regards  
Vinay

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [September 26, 2016, 9:46am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/13 "2016-09-26T09:46:27Z")

</div>

Hi Magnus

I have uploaded the two index contents in document. Please have a look and help

> **[kvopencode/elkrepo](https://github.com/kvopencode/elkrepo)**
>
> Contribute to elkrepo development by creating an account on GitHub.

indexNotReadingDocuments-Brief.docx

Regards  
Vinay

---

<div class="post-metadata">

**Author:** ![Karpagavinayagam\_U](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@Karpagavinayagam\_U](https://discuss.elastic.co/u/Karpagavinayagam_U)\
**Post date:** [November 7, 2016, 9:02am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/14 "2016-11-07T09:02:14Z")

</div>

Team

Can you check and reply on this pending item

Regards  
Vinay

---

<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:** [November 7, 2016, 9:34am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/15 "2016-11-07T09:34:00Z")

</div>

I saw your response earlier but for some reason didn't respond. Maybe I didn't know what was wrong.

---

<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:30am UTC](https://discuss.elastic.co/t/index-not-returning-results-elk-can-index-creation-be-automated/60497/16 "2017-07-06T04:30:50Z")

</div>


