# Logstash & Beat :index\_not\_found\_exception

**URL:** https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137
**Category:** Logstash
**Created:** [June 24, 2018, 8:17am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137 "2018-06-24T08:17:50Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)
#### Post date: [June 24, 2018, 8:17am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/1 "2018-06-24T08:17:50Z")

</div>

Hello,

I am following [theLogstash tutorial](https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html). This Command  
curl -XGET 'localhost:9200/logstash-2018.06.24/\_search?q=response=200'  
returns the following error, instead of the data shown in the tutorial:  
`{ "error" : { "root_cause" : [{ "type" : "index_not_found_exception", "reason" : "no such index", "resource.type" : "index_or_alias", "resource.id" : "logstash-2018.06.24", "index_uuid" : "_na_", "index" : "logstash-2018.06.24" }], "type" : "index_not_found_exception", "reason" : "no such index", "resource.type" : "index_or_alias", "resource.id" : "logstash-2018.06.24", "index_uuid" : "_na_", "index" : "logstash-2018.06.24" }, "status" : 404`  
Elasticsearch is running correctly on the (localhost). This is the content of logstash.conf as indicated by the tutorial:  
input {  
beats {  
port =\> "5044"  
}  
}

filter {  
grok {  
match =\> { "message" =\> "%{COMBINEDAPACHELOG}"}  
}  
geoip {  
source =\> "clientip"  
}  
}

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
}  
}

and the Logstash process is run, as indicated, as  
bin/logstash -f logstash.conf --config.test\_and\_exit

What is the reason for this error?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 24, 2018, 8:26am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/2 "2018-06-24T08:26:44Z")

</div>

I think you will need to elaborate a bit more on your issue if anyone is going to be able to help you...

---

<div class="post-metadata">

### Author: ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)
#### Post date: [June 24, 2018, 8:31am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/3 "2018-06-24T08:31:49Z")

</div>

i did it

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 24, 2018, 8:35am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/4 "2018-06-24T08:35:09Z")

</div>

> [@bab](#):
>
> --config.test\_and\_exit

If you specify this you actually do not process any data. This is meant as a first step to verify that your config is OK. If it passes, you need to remove it to process data.

You can also look at [this introduction to Logstash](https://www.elastic.co/blog/a-practical-introduction-to-logstash).

---

<div class="post-metadata">

### Author: ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)
#### Post date: [June 24, 2018, 8:42am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/5 "2018-06-24T08:42:15Z")

</div>

hello Christian,  
yes i know i do that to test my logstash.config configuration and i get : ## expected result ....Conifg Validation resulat: OK.Exiting Logstash.After that i do this Command : --config.reload.automatic to restart my logstash.conf.  
But i get this same issue !?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 24, 2018, 8:46am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/6 "2018-06-24T08:46:07Z")

</div>

What happens if you start Logstash like this: `bin/logstash -f logstash.conf`

---

<div class="post-metadata">

### Author: ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)
#### Post date: [June 24, 2018, 9:12am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/7 "2018-06-24T09:12:58Z")

</div>

So due to the logstash-toturial the command (--config.test\_and\_exit) is for test the new configuration and the second command (--config.reload.automatic) is for starting logstash and automatic reloading after any change in logstash.conf. (BOTH COMMANDOS WORK GOOD)  
So when I set my logstash output to (stdout {codec =\> rubydebug}), on the console I get the parsed log events quite clearly. The question is if i configure my logstash output to elasticSearch it should theoretically store my log event in elasticSearch, for that i need an index, due to logstash toturial guid i need to run this command (curl -XGET 'localhost: 9200 / logstash-2018.06. 24 / \_search? Pretty & q = response = 200 '), at this point I get the issuie. how can I even save my new parsed log events in elasticsearch and browse & visiualize those in kibana

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 24, 2018, 9:20am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/8 "2018-06-24T09:20:52Z")

</div>

Your data may not end up in that particular daily index, so instead do: `curl -XGET 'localhost:9200/logstash-*/_search?pretty&q=response=200'`. This will query all Logstash indices.

You can also run `curl -XGET localhost:9200/_cat/indices` to verify that indices have been created.

---

<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 22, 2018, 9:21am UTC](https://discuss.elastic.co/t/logstash-beat-index-not-found-exception/137137/9 "2018-07-22T09:21:00Z")

</div>

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