# Checking if ANY logstash index exists

**URL:** <https://discuss.elastic.co/t/checking-if-any-logstash-index-exists/140250>\
**Category:** Elasticsearch\
**Created:** [July 17, 2018, 6:17am UTC](https://discuss.elastic.co/t/checking-if-any-logstash-index-exists/140250 "2018-07-17T06:17:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick-george](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick-george/32/23318_2.png) [@nick-george](https://discuss.elastic.co/u/nick-george)\
**Post date:** [July 17, 2018, 6:17am UTC](https://discuss.elastic.co/t/checking-if-any-logstash-index-exists/140250/1 "2018-07-17T06:17:09Z")

</div>

Hi,

Elasticsearch version 6.2.4

I'm trying to see if any logstash index exists using the Python API and with dev\_tools.

I'm following these docs:  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-exists.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-exists.html)  
and here:  
[https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.client.IndicesClient.exists](https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.client.IndicesClient.exists)

If I do the following, you can see that no logstash index exists.

```
GET _cat/indices
green open telegraf-2018.07.17 1AM5fYwmSsaLFYRndyw_mw 2 0 4348 0 1.1mb 1.1mb
green open .kibana q_OnrKElTqOZsD8YnNr70w 2 0 16 0 95kb 95kb

```

Then I check to see if any logstash index exists using a wildcard.

```
HEAD logstash-*
200 - OK

```

And finally, a check for a specific index nam

```
HEAD logstash-2017.07.17
404 - Not Found

```

You can see that while a query to see if the exact index name exists returns a 404, but the check to see if logstash-\* exists returns a 200 OK. Could someone please explain why the wildcard search is failing? I don't have any index name with that pattern. I'm confused why the python API docs mention wildcards when they don't appear to work.

If wildcard searches don't work in this way, would it be worth updating the docs to reflect this?

Thanks for your time,  
Nick

---

<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 14, 2018, 6:17am UTC](https://discuss.elastic.co/t/checking-if-any-logstash-index-exists/140250/2 "2018-08-14T06:17:11Z")

</div>

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