# Kibana 5.0.2 reset defaultIndex manually

**URL:** https://discuss.elastic.co/t/kibana-5-0-2-reset-defaultindex-manually/67901
**Category:** Kibana
**Created:** [December 2, 2016, 7:55pm UTC](https://discuss.elastic.co/t/kibana-5-0-2-reset-defaultindex-manually/67901 "2016-12-02T19:55:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kaem2111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaem2111/32/24961_2.png) [@kaem2111](https://discuss.elastic.co/u/kaem2111)
#### Post date: [December 2, 2016, 7:55pm UTC](https://discuss.elastic.co/t/kibana-5-0-2-reset-defaultindex-manually/67901/1 "2016-12-02T19:55:44Z")

</div>

Hello,  
I am using kibana 5.0.2. I have accidentially removed default index pattern for logstash-\* and now I am not able to set it again using Management=\>Advanced settings, because Management unfortunaly requires valid defaultIndex **before** starting as shown here

 ![](https://us1.discourse-cdn.com/elastic/original/2X/e/e0346e57ee58254394c0618479145014c28a5415.png)

Kibana reinstall did not work.  
Is there an alternate way to setup defaultIndex field manually?

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [December 2, 2016, 11:30pm UTC](https://discuss.elastic.co/t/kibana-5-0-2-reset-defaultindex-manually/67901/2 "2016-12-02T23:30:14Z")

</div>

Yeah, that's a known bug ([https://github.com/elastic/kibana/issues/9028](https://github.com/elastic/kibana/issues/9028)).

edit: you should be able to send a post request to the kibana server like this:

```auto
#change for your needs
KIBANA_URL="http://localhost:5601"
NEW_INDEX="logstash-*"

curl -XPOST "$KIBANA_URL/api/kibana/settings/defaultIndex" -d "{
  \"value\": \"$NEW_INDEX\"
}"

```

---

<div class="post-metadata">

### Author: ![kaem2111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaem2111/32/24961_2.png) [@kaem2111](https://discuss.elastic.co/u/kaem2111)
#### Post date: [December 3, 2016, 2:54pm UTC](https://discuss.elastic.co/t/kibana-5-0-2-reset-defaultindex-manually/67901/3 "2016-12-03T14:54:49Z")

</div>

I already tried that before, but always got a

> {"statusCode":400,"error":"Bad Request","message":"Request must contain an kbn-xsrf header"}

and assumed that this was implemented to protect the api.

I solved this issue now by doing a:

> curl -u imyii:$px -XGET "[http://by0kmi:5601/api/kibana/settings](http://by0kmi:5601/api/kibana/settings)"

> {"settings":{"buildNum":{"userValue":14476},"timelion:showTutorial":{"userValue":false},"dashboard:defaultDarkTheme":{"userValue":true},"timepicker:timeDefaults":{"userValue":"{\n "from": "now-1h",\n "to": "now",\n "mode": "quick"\n}"}," **defaultIndex**":{"userValue":"**[.marvel-es-]YYYY.MM.DD**"},"discover:aggs:terms:size":{"userValue":20}}}

and create a new index using console

> PUT /.marvel-es-2016.11.11  
> {  
> }

This make the tools available again  
Thank you for the hints!

---

<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: [December 31, 2016, 2:54pm UTC](https://discuss.elastic.co/t/kibana-5-0-2-reset-defaultindex-manually/67901/4 "2016-12-31T14:54:53Z")

</div>

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