# Logastash container went down - we did not monitor it

**URL:** <https://discuss.elastic.co/t/logastash-container-went-down-we-did-not-monitor-it/263771>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [February 9, 2021, 4:31pm UTC](https://discuss.elastic.co/t/logastash-container-went-down-we-did-not-monitor-it/263771 "2021-02-09T16:31:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [February 9, 2021, 4:31pm UTC](https://discuss.elastic.co/t/logastash-container-went-down-we-did-not-monitor-it/263771/1 "2021-02-09T16:31:28Z")

</div>

Hi there,  
I had the case that the logstash container (7.8.1) just stopped working and we did not nominitor it. What I would have liked: in the momen it crashed docker should have restarted it from the scratch.  
Question: Would using the restart policy 'always' achieved this? Is there a way to test this behaviour?  
Thank you for your inside!  
cheers  
Stefano

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [February 9, 2021, 5:48pm UTC](https://discuss.elastic.co/t/logastash-container-went-down-we-did-not-monitor-it/263771/2 "2021-02-09T17:48:44Z")

</div>

While not a direct answer to your question, you could leverage the Logstash monitoring API to check it's health. For a time, I was having issues keeping pipelines up even though Logstash was running, so I wrote a powershell script to query the API, and if it came back with unwanted results, the script would restart Logstash. I've got it in a [repo on github](https://github.com/wwalker0307/Logstash-Monitor), I think if you are just looking for up/down status, hitting the server on tcp/9600 will give you what you need.

---

<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 9, 2021, 5:49pm UTC](https://discuss.elastic.co/t/logastash-container-went-down-we-did-not-monitor-it/263771/3 "2021-03-09T17:49:05Z")

</div>

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