Logging.yml configuration for emailing errors


(rene z) #1

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.
For more options, visit https://groups.google.com/groups/opt_out.


Send ERROR logs by email - SMTP appender
(Ivan Brusic) #2

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 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(rene z) #3

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 <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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(hazzadous) #4

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 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(rene z) #5

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

appender:
email:
type: smtp
smtpHost: smtp.example.net
from: host@example.net
to: admin@example.net
subject: Error 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 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(Fabioebner) #6

rene_z

you could set up?

how r u file?

tks


(system) #7