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://user:password@host:port/index',
}
user:password will be used for authentication for your elasticsearch, but even if you don't use basic http authentication Raven requires setting them, for valid Sentry dsn.
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
##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
[![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://user:password@host:port/index',
}
user:password will be used for authentication for your elasticsearch, but even if you don't use basic http authentication Raven requires setting them, for valid Sentry dsn.
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
##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
File details
Details for the file Elasticsearch-Raven-1.0.tar.gz
.
File metadata
- Download URL: Elasticsearch-Raven-1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871da984c497dd4103a7ce602a1808b74989529a1f9e6c9bbb79b211c87558c9 |
|
MD5 | 8da8004d042a80769558eb6b4d523e78 |
|
BLAKE2b-256 | abd7843729e94dcefd2dabac71f223ec5ca23588563652f8625a4b8304b93e05 |