哨兵点头弹性搜索后端
sentry_elastic_nodestore的Python项目详细描述
info: | Sentry nodestore Elasticsearch backend |
---|
安装
pip install sentry_elastic_nodestore
配置
在sentry.conf.py处设置SENTRY_NODESTORE
fromelasticsearchimportElasticsearches=Elasticsearch(['127.0.0.1:9200'])SENTRY_NODESTORE='sentry_elastic_nodestore.ElasticNodeStorage'SENTRY_NODESTORE_OPTIONS={'es':es,'refresh':False,# https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html}fromsentry.conf.serverimport*# default for sentry.conf.pyINSTALLED_APPS=list(INSTALLED_APPS)INSTALLED_APPS.append('sentry_elastic_nodestore')INSTALLED_APPS=tuple(INSTALLED_APPS)
用法
设置ElasticSearch模板
sentry --config sentry.conf.py django elastic_template