# Logging.yml configuration for emailing errors

**URL:** <https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751>\
**Category:** Elasticsearch\
**Created:** [February 15, 2013, 4:38am UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751 "2013-02-15T04:38:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rene\_z](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@rene\_z](https://discuss.elastic.co/u/rene_z)\
**Post date:** [February 15, 2013, 4:38am UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/1 "2013-02-15T04:38:06Z")

</div>

Hi,  
I would like to receive an email when my cluster logs an error.  
How do I configure the logging.yml?

Bye,  
René

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 15, 2013, 5:07am UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/2 "2013-02-15T05:07:49Z")

</div>

You would need to setup a log4j SMTPAppender. You can find numerous  
examples on line.

--  
Ivan

On Thu, Feb 14, 2013 at 8:38 PM, rene z [codingisfun@gmail.com](mailto:codingisfun@gmail.com) wrote:

> Hi,  
> I would like to receive an email when my cluster logs an error.  
> How do I configure the logging.yml?
> 
> Bye,  
> René
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![rene\_z](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@rene\_z](https://discuss.elastic.co/u/rene_z)\
**Post date:** [February 15, 2013, 6:30am UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/3 "2013-02-15T06:30:59Z")

</div>

Weel, I tried but could not figure out exactly how to configure a  
SMTPAppender.  
My thoughts are not everything is implemented in ES to support the  
SMTPAppender,

Maybe someone can help me out?

Op vrijdag 15 februari 2013 06:07:49 UTC+1 schreef Ivan Brusic het volgende:

> You would need to setup a log4j SMTPAppender. You can find numerous  
> examples on line.
> 
> --  
> Ivan
> 
> On Thu, Feb 14, 2013 at 8:38 PM, rene z \<[codin...@gmail.com](mailto:codin...@gmail.com) \<javascript:\>\>wrote:
> 
> > Hi,  
> > I would like to receive an email when my cluster logs an error.  
> > How do I configure the logging.yml?
> > 
> > Bye,  
> > René
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![hazzadous](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hazzadous/32/1654_2.png) [@hazzadous](https://discuss.elastic.co/u/hazzadous)\
**Post date:** [February 15, 2013, 2:57pm UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/4 "2013-02-15T14:57:59Z")

</div>

I haven't set up SMTP logs but have set up sentry loggers with success  
(which in turn does email alerts etc.) Something like:

rootLogger: INFO, console, file, sentry

appender:  
sentry:  
type: net.kencochrane.sentry.SentryAppender  
sentry\_dsn: "\<sentry\_dsn\>"  
threshold: ERROR

Of course, you may not be interested in using sentry, but don't see why  
SMTPAppender wouldn't work equally as well.

On Friday, 15 February 2013 06:30:59 UTC, rene z wrote:

> Weel, I tried but could not figure out exactly how to configure a  
> SMTPAppender.  
> My thoughts are not everything is implemented in ES to support the  
> SMTPAppender,
> 
> Maybe someone can help me out?
> 
> Op vrijdag 15 februari 2013 06:07:49 UTC+1 schreef Ivan Brusic het  
> volgende:
> 
> > You would need to setup a log4j SMTPAppender. You can find numerous  
> > examples on line.
> > 
> > --  
> > Ivan
> > 
> > On Thu, Feb 14, 2013 at 8:38 PM, rene z [codin...@gmail.com](mailto:codin...@gmail.com) wrote:
> > 
> > > Hi,  
> > > I would like to receive an email when my cluster logs an error.  
> > > How do I configure the logging.yml?
> > > 
> > > Bye,  
> > > René
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![rene\_z](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@rene\_z](https://discuss.elastic.co/u/rene_z)\
**Post date:** [February 19, 2013, 2:04pm UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/5 "2013-02-19T14:04:28Z")

</div>

This is how I setup the configuration, but still no succes:  
rootLogger: ..., email

appender:  
email:  
type: smtp  
smtpHost: [smtp.example.net](http://smtp.example.net)  
from: [host@example.net](mailto:host@example.net)  
to: [admin@example.net](mailto:admin@example.net)  
subject: Error [example.net](http://example.net)  
layout:  
type: pattern  
conversionPattern: .....

I tried different combinations like "host:" instead of "smtpHost", and  
"type: org.apache.log4j.net.SMTPAppender" instead of "type: smtp".

Who can help me with a working configuration?

TIA,  
René

Op vrijdag 15 februari 2013 15:57:59 UTC+1 schreef hazzadous het volgende:

> I haven't set up SMTP logs but have set up sentry loggers with success  
> (which in turn does email alerts etc.) Something like:
> 
> rootLogger: INFO, console, file, sentry
> 
> appender:  
> sentry:  
> type: net.kencochrane.sentry.SentryAppender  
> sentry\_dsn: "\<sentry\_dsn\>"  
> threshold: ERROR
> 
> Of course, you may not be interested in using sentry, but don't see why  
> SMTPAppender wouldn't work equally as well.
> 
> On Friday, 15 February 2013 06:30:59 UTC, rene z wrote:
> 
> > Weel, I tried but could not figure out exactly how to configure a  
> > SMTPAppender.  
> > My thoughts are not everything is implemented in ES to support the  
> > SMTPAppender,
> > 
> > Maybe someone can help me out?
> > 
> > Op vrijdag 15 februari 2013 06:07:49 UTC+1 schreef Ivan Brusic het  
> > volgende:
> > 
> > > You would need to setup a log4j SMTPAppender. You can find numerous  
> > > examples on line.
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Thu, Feb 14, 2013 at 8:38 PM, rene z [codin...@gmail.com](mailto:codin...@gmail.com) wrote:
> > > 
> > > > Hi,  
> > > > I would like to receive an email when my cluster logs an error.  
> > > > How do I configure the logging.yml?
> > > > 
> > > > Bye,  
> > > > René
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![fabioebner](https://avatars.discourse-cdn.com/v4/letter/f/a3d4f5/32.png) [@fabioebner](https://discuss.elastic.co/u/fabioebner)\
**Post date:** [July 23, 2015, 5:34pm UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/6 "2015-07-23T17:34:13Z")

</div>

rene\_z

you could set up?

how r u file?

tks

---

<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 5, 2017, 11:59pm UTC](https://discuss.elastic.co/t/logging-yml-configuration-for-emailing-errors/10751/7 "2017-07-05T23:59:27Z")

</div>


