# How to restart Kibana automatically?

**URL:** <https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460>\
**Category:** Kibana\
**Created:** [May 7, 2016, 2:44pm UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460 "2016-05-07T14:44:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Libfy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/libfy/32/6929_2.png) [@Libfy](https://discuss.elastic.co/u/Libfy)\
**Post date:** [May 7, 2016, 2:44pm UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/1 "2016-05-07T14:44:20Z")

</div>

Hey guys,

I'm looking for a way to restart Kibana through a script and to make sure that Kibana will use the good Index Pattern and the good Time-field name.  
For the moment, each time I restart Kibana, I need to do this manually through the GUI.

Thanks for your help.

Libfy

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 7, 2016, 8:48pm UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/2 "2016-05-07T20:48:36Z")

</div>

If you need to manually set an index pattern and timestamp there are other problems.

What exactly is happening?

---

<div class="post-metadata">

**Author:** ![Libfy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/libfy/32/6929_2.png) [@Libfy](https://discuss.elastic.co/u/Libfy)\
**Post date:** [May 10, 2016, 6:56am UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/3 "2016-05-10T06:56:06Z")

</div>

About once per day, I need to restart ELK on my servers and I don't know why.

So, when I stop each service and restart them, I need to go to Kibana Settings, and setup the right Time-Field name.

I just want to find the way to automatically setup this information to script the restart.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 10, 2016, 7:01am UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/4 "2016-05-10T07:01:23Z")

</div>

You should fix the actual problem, why do you need to restart?  
What problems do you see?

---

<div class="post-metadata">

**Author:** ![Libfy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/libfy/32/6929_2.png) [@Libfy](https://discuss.elastic.co/u/Libfy)\
**Post date:** [May 10, 2016, 7:06am UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/5 "2016-05-10T07:06:41Z")

</div>

For whatever reason (I looked in the logs of each service), after several hours of operation, I get this message on Kibana:

plugin:elasticsearch Elasticsearch is still initializing the kibana index... Trying again in 2.5 second.

And I can wait forever, it will not do anything.  
I have to restart everything.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 10, 2016, 7:13am UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/6 "2016-05-10T07:13:29Z")

</div>

Have you looked at your ES logs as well?

---

<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 6, 2017, 1:53pm UTC](https://discuss.elastic.co/t/how-to-restart-kibana-automatically/49460/7 "2017-07-06T13:53:53Z")

</div>


