对CKAN的Logstash支持
ckanext-logstash的Python项目详细描述
LogStash CKAN扩展允许向CKAN和堆栈添加一个Logstash中间件,还可以选择配置LohStash日志处理程序。在
此扩展建立在先前工作的基础上:
- @在https://github.com/okfn/ckanext-sentry上确定。在
- @noirbizarre在https://github.com/etalab/ckanext-sentry
- @rshk在https://github.com/opendatatrentino/ckanext-sentry
安装
要安装扩展,请激活virtualenv并运行:
pip install ckanext-logstash
或者,您可以安装具有以下功能的开发版本:
^{pr2}$配置
要激活插件,请将logstash添加到ini文件中的ckan.plugins密钥中:
ckan.plugins = logstash <other-plugins>
必须提供Logstash终结点:
logstash.kind = tcp/udp/amqp logstash.host = <hostname> logstash.port = <port> (5959 by default)
如果您希望Logstash记录日志消息,可以通过添加以下选项将其打开:
logstash.configure_logging=True logstash.log_level=WARN
配置中未提供的默认日志级别为INFO。在
所有这些配置选项也可以通过环境变量传递:
- CKAN_LOGSTASH_KIND
- CKAN_LOGSTASH_HOST
- CKAN_LOGSTASH_PORT
- CKAN_SENTRY_CONFIGURE_LOGGING
- CKAN_SENTRY_LOG_LEVEL
该配置还支持名为 比如ckanext-envvars扩展约定(例如CKAN___LOGSTASH__LOG_LEVEL)。在
- 项目
标签: