# Disabling check for non existing indices

**URL:** <https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082>\
**Category:** Kibana\
**Created:** [February 8, 2018, 3:58pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082 "2018-02-08T15:58:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ailurus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ailurus/32/17368_2.png) [@Ailurus](https://discuss.elastic.co/u/Ailurus)\
**Post date:** [February 8, 2018, 3:58pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082/1 "2018-02-08T15:58:44Z")

</div>

Hi,

I have already used ELK 5.2 and i'm now testing ELK 5.6.7 (currently, the latest 5+ version).

When i'm automatically setting up my Elastic node, i configure the Kibana index-pattern.  
Basically, I send some HTTP requests to the my elasticsearch. For example, for the index-pattern "syslog-\*" i perform this kind of POST request:

```
curl -XPOST localhost:9200/.kibana/index-pattern/syslog-*/_create [...]

```

However, I encounter some error when i'm connecting to Kibana:

> No matching indices found: No indices match pattern "syslog-\*"

Right, since at this time Elastic does not have any "syslog-[...]" indices.

After some investigation, I found that the Kibana backend API is responsible of this error:

```
localhost:5601/api/index_patterns/_fields_for_wildcard?pattern=syslog-*

```

In Kibana 5.2 i didn't encounter any error when my Elasticsearch indices were not existing (probably because this API was not part of this version).

Is there a way to disable this type of error on Kibana (through its configuration file for example) or any workaround to don't check that the indices exist in Elasticsearch ?

Thanks in advance 🙂

Best regards,

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [February 8, 2018, 8:15pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082/2 "2018-02-08T20:15:11Z")

</div>

Hello,

This seems to be an open issue, we're investigating it. You can follow it for any updates.

> <https://github.com/elastic/kibana/issues/15666>

---

<div class="post-metadata">

**Author:** ![Ailurus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ailurus/32/17368_2.png) [@Ailurus](https://discuss.elastic.co/u/Ailurus)\
**Post date:** [February 8, 2018, 8:59pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082/3 "2018-02-08T20:59:27Z")

</div>

Hi Marius,

Thanks for your answer, but i guess that it's not the same "issue".

In fact, I can create index pattern even with non existing Elastic indices (at the opposite of the issue given in your link).

In my case, i would like to disable the error message ("No matching indices found: [...]") that is displayed when i have an index pattern but no data in Elastic, thus no indices.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [February 8, 2018, 9:27pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082/4 "2018-02-08T21:27:38Z")

</div>

That is not configurable afaik, so you would have to modify the source an rebuild Kibana in order to remove that.

---

<div class="post-metadata">

**Author:** ![Ailurus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ailurus/32/17368_2.png) [@Ailurus](https://discuss.elastic.co/u/Ailurus)\
**Post date:** [February 12, 2018, 12:53pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082/5 "2018-02-12T12:53:02Z")

</div>

Yes, it seems that it's not configurable so I have modified the source code and rebuilt Kibana.

A possible way to do this, is to modify the file `src/ui/public/index_patterns/_index_patterns.js` and its `refreshFields()` function.

Its original content is the following one (comments has been removed):

```auto
refreshFields() {
  return fetchFields(this)
  .then(() => this.save())
  .catch((err) => {
    notify.error(err);
    if (err instanceof IndexPatternMissingIndices) {
      return [];
    }
    throw err;
  });
}

```

The modification performed to hide the error message is the following:

```auto
refreshFields() {
  return fetchFields(this)
  .then(() => this.save())
  .catch((err) => {
    if (err instanceof IndexPatternMissingIndices) {
      return [];
    }
    notify.error(err);
    throw err;
  });
}

```

Here, an error will be propagated but no error notification will be created, thus displayed in the Kibana interface.

---

<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:** [March 12, 2018, 12:53pm UTC](https://discuss.elastic.co/t/disabling-check-for-non-existing-indices/119082/6 "2018-03-12T12:53:10Z")

</div>

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