Skip to main content

Proxy that allows to send logs from Raven to Elasticsearch.

Project description

#elasticsearch-raven

[![Build Status](https://travis-ci.org/pozytywnie/elasticsearch-raven.svg?branch=master)](https://travis-ci.org/pozytywnie/elasticsearch-raven)

Proxy that allows to log from raven to elasticsearch.

##Installation
###Package

elasticsearch-raven can be installed as a normal Python package.
Example installation for pip:

$ pip install elasticsearch-raven

##Configuration

###settings.py

Configure Ravan to your proxy location

RAVEN_CONFIG = {
'dsn': 'protocol://public:secret@host:port/index',
}
public:secret is required by Raven, for valid Sentry dsn pattern, but it doesn't affect log sending.

Indexes are formatted with actual date.
Suggested format:

**basic-index-{0:%Y.%m.%d}** will result in **basic-index-YYYY.MM.DD**

###Environment Variables

Define elasticsearch location by setting environment variable ELASTICSEARCH_HOST (default: 'localhost:9200')

export ELASTICSEARCH_HOST='localhost:9100'

If you use your elasticsearch with https protocol, you should set environment variable USE_SSL to True

export USE_SSL=True

To use http authentication just set ELASTICSEARCH_AUTH variable using 'login:password' format

export ELASTICSEARCH_AUTH=login:password

##Usage
###Option 1: wsgi

You can run wsgi.py with any http server that supports wsgi.
Example using python simple HTTP server.

#!/usr/bin/env python
from elasticsearch_raven.wsgi import application
from wsgiref.simple_server import make_server

httpd = make_server('', 8000, application)
httpd.serve_forever()

###Option 2: UDP server

You can run udp server with command:

elasticsearch-raven.py host port

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Elasticsearch-Raven-1.1.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file Elasticsearch-Raven-1.1.tar.gz.

File metadata

File hashes

Hashes for Elasticsearch-Raven-1.1.tar.gz
Algorithm Hash digest
SHA256 2a6876b451cddaf64269e5acd0c4eb22bd13afac9ee3da1c21770e058620639a
MD5 0d6ad049476d1b064149fb532fd50f0f
BLAKE2b-256 8cfe2deb07a588dc1620c41fc13ae3b93d345867a77d7a26e4d0a8e06e324775

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page