# ELK Exception handling

**URL:** <https://discuss.elastic.co/t/elk-exception-handling/88743>\
**Category:** Logstash\
**Created:** [June 8, 2017, 4:48pm UTC](https://discuss.elastic.co/t/elk-exception-handling/88743 "2017-06-08T16:48:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjeevkt](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@sanjeevkt](https://discuss.elastic.co/u/sanjeevkt)\
**Post date:** [June 8, 2017, 4:48pm UTC](https://discuss.elastic.co/t/elk-exception-handling/88743/1 "2017-06-08T16:48:12Z")

</div>

Hello,  
We have done ELK setup in out application and that works fine

Issue: When ELK is down due to any reason then our main application is also not getting up, below is the exception

Could not create SyslogWriter java.net.UnknownHostException: elk: Try again  
at java.net.UnknownHostException: elk: Try again

Any idea how to do Exception handling or How and what to configure in logstash that if it is not up then it should get skiped,  
Thanks,  
Sanjeev

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 8, 2017, 7:46pm UTC](https://discuss.elastic.co/t/elk-exception-handling/88743/2 "2017-06-08T19:46:26Z")

</div>

Don't configure your application to talk directly to Logstash. Have it write its logs to a file that you ship with Filebeat or Logstash.

---

<div class="post-metadata">

**Author:** ![sanjeevkt](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@sanjeevkt](https://discuss.elastic.co/u/sanjeevkt)\
**Post date:** [June 8, 2017, 7:56pm UTC](https://discuss.elastic.co/t/elk-exception-handling/88743/3 "2017-06-08T19:56:23Z")

</div>

We have the applications different, And have docker images

When we start 1 microservices with docker image and ELK is not started, then we are getting the exception, Discovery microserice is dependent on ELK

We have configured ELK image in docker composer with other microservices,

Thanks,  
Sanjeev

---

<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, 7:56pm UTC](https://discuss.elastic.co/t/elk-exception-handling/88743/4 "2017-07-06T19:56:52Z")

</div>

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