Get errors from logs

We are using elasticsearch together with couchdb, and they run on different
servers.

Everything works fine but the problem is that we don't have a clue when
something goes wrong, because the errors from the logs are not
automatically parsed and feed into sentry (which we use for centralising
the logs). The problem is that elasticsearch.log contains everything
together, and the documentation about how to configure the logging is a bit
lacking imho...

How would I for example log on a separate files all the errors for example?
All we need is a way to parse possible errors from files somehow and log
them into sentry as well, any suggestions?

Thanks a lot,
Andrea

--

If you are familiar with log4j (
Apache log4j 1.2 - Short introduction to log4j) configuring elasticsearch
logs should be easy because by default elasticsearch is using log4j. The
logging.yml file is basically standard log4j.properties file only
translated from .properties format into YAML format with all log4j.
prefixes omitted. Basically something like

rootLogger: INFO, console, file
logger:

log action execution errors for easier debugging

action: DEBUG
.....

in standard log4j.properties file would look like

log4j.rootLogger=INFO, console, file
log4j.logger.action=DEBUG
.....

For example, to log errors and warnings into a separate file, you can
simply create a new file appender file_warn with threshold set to WARN and
add it to the rootLogger:

rootLogger: INFO, console, file*, file_warn*
....
appender:
....
*
file_warn:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}-warn.log
threshold: WARN
datePattern: "'.'yyyy-MM-dd"
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
*
....

On Tuesday, January 8, 2013 5:25:46 AM UTC-5, andrea crotti wrote:

We are using elasticsearch together with couchdb, and they run on
different servers.

Everything works fine but the problem is that we don't have a clue when
something goes wrong, because the errors from the logs are not
automatically parsed and feed into sentry (which we use for centralising
the logs). The problem is that elasticsearch.log contains everything
together, and the documentation about how to configure the logging is a bit
lacking imho...

How would I for example log on a separate files all the errors for
example? All we need is a way to parse possible errors from files somehow
and log them into sentry as well, any suggestions?

Thanks a lot,
Andrea

--