Title: elasticsearch + sentry = happy days Date: 2013-05-21 15:06 Author: eamonnfaherty Category: devops Tags: elasticsearch, sentry Slug: elasticsearch-sentry-happy-days
I have been using the amazing Sentry for quite some time and I love it. For anybody running a live site it really is a must!
BTW, I am on Ubuntu 12.04, installed elasticsearch via a deb file downloaded from their site and installed sentry via pip.
Once I was all setup I wanted to enabling logging of elasticsearch to my centralised sentry instance. This was a real pain and would have taken me a lot longer to complete (if at all) if it wasn’t for ColinHebert - details. Thanks again!
Here is what I had to do to get it working:
Elasticsearch uses log4j for logging but has a yaml file to configure it instead of a properties file. I had to append this to my /etc/elasticsearch/logging.yml file:
sentry: type: net.kencochrane.raven.log4j.SentryAppender dsn: "http://XXXX:YYY@myserver.com/N"
I also change the first line to read:
rootLogger: DEBUG, console, file, sentry
All I did was append sentry to the list of rootLoggers.
Once the config was sorted I had to download the dependencies:
and add them to /usr/share/elasticsearch/lib on the machine hosting elasticsearch.
Once that was all done restarting elasticsearch was all that remained and I was logging to sentry!