# Kibana makes default index-pattern a not existing one

**URL:** https://discuss.elastic.co/t/kibana-makes-default-index-pattern-a-not-existing-one/249716
**Category:** Kibana
**Created:** [September 23, 2020, 10:38pm UTC](https://discuss.elastic.co/t/kibana-makes-default-index-pattern-a-not-existing-one/249716 "2020-09-23T22:38:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)
#### Post date: [September 23, 2020, 10:38pm UTC](https://discuss.elastic.co/t/kibana-makes-default-index-pattern-a-not-existing-one/249716/1 "2020-09-23T22:38:51Z")

</div>

Hi ,

I used the below command  
curl -k --show-error "10.254.43.178:5601/api/kibana/settings" --max-time 3 --retry 1 -H 'kbn-version: 7.0.1' -H 'Content-Type: application/json' --data-binary '{"changes":{"defaultIndex":" **giouxou\_index\_pattern**"}}' --compressed --write-out %{http\_code}

giouxou\_index\_pattern **doesn't exists** but the above command give as http **response**  
{"settings":{"buildNum":{"userValue":23202},"defaultIndex":{"userValue":"giouxou\_index\_pattern"}}}200  
and as curl status 0.

Also in kibana before commad the default index-pattern was the **fmdata** but after the command it is not any more as shown in the below snip  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/6/46a52254032ac442a7dc7ffb0698743b0843f5dd.png)

Could you please comment on that? Is that a bug?

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [September 24, 2020, 6:36pm UTC](https://discuss.elastic.co/t/kibana-makes-default-index-pattern-a-not-existing-one/249716/2 "2020-09-24T18:36:21Z")

</div>

Hello,

Sorry I am a bit confused with your post. What was the intended action with this command please and which context did you use it?

"curl -k --show-error "10.254.43.178:5601/api/kibana/settings" --max-time 3 --retry 1 -H 'kbn-version: 7.0.1' -H 'Content-Type: application/json' --data-binary '{"changes":{"defaultIndex":" **giouxou\_index\_pattern**"}}' --compressed --write-out %{http\_code}"

Thanks,  
bhavya

---

<div class="post-metadata">

### Author: ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)
#### Post date: [September 25, 2020, 5:51am UTC](https://discuss.elastic.co/t/kibana-makes-default-index-pattern-a-not-existing-one/249716/3 "2020-09-25T05:51:50Z")

</div>

Hi,

With this command you are setting a kibana index-pattern as default. In my kibana only **fmdata** index-pattern exists and initially fmdata was set to be the default index-pattern. But when I am setting as default index-pattern the non existing index-pattern **giouxou\_index\_pattern** , I get as http response 200 -\> OK and in kibana i see that the existing index-pattern fmdata is not the default one anymore.  
Shouldn't kibana not to accept to set a non existing index-pattern as default?  
Thank you in advance!

---

<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: [October 23, 2020, 5:51am UTC](https://discuss.elastic.co/t/kibana-makes-default-index-pattern-a-not-existing-one/249716/4 "2020-10-23T05:51:53Z")

</div>

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