# How to shut down filebeat properly

**URL:** <https://discuss.elastic.co/t/how-to-shut-down-filebeat-properly/95422>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 1, 2017, 10:00pm UTC](https://discuss.elastic.co/t/how-to-shut-down-filebeat-properly/95422 "2017-08-01T22:00:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![filebeater](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/filebeater/32/18565_2.png) [@filebeater](https://discuss.elastic.co/u/filebeater)\
**Post date:** [August 1, 2017, 10:00pm UTC](https://discuss.elastic.co/t/how-to-shut-down-filebeat-properly/95422/1 "2017-08-01T22:00:28Z")

</div>

Hello,  
We run filebeat from the command line. I am wondering is there a way to shutdown filebeat properly other than "kill -9", so that filebeat has chance to save its state before exit?

thanks.  
yan

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [August 2, 2017, 8:47am UTC](https://discuss.elastic.co/t/how-to-shut-down-filebeat-properly/95422/2 "2017-08-02T08:47:53Z")

</div>

SIGTERM should be enough normally, so `kill` without `-9`. It might take a few seconds, but it should shutdown properly, we'd consider it a bug if it doesn't.

`kill -9` can result in duplicates, but shouldn't lose log lines.

---

<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 30, 2017, 8:47am UTC](https://discuss.elastic.co/t/how-to-shut-down-filebeat-properly/95422/3 "2017-08-30T08:47:55Z")

</div>

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