ivankrizsan / elastalert泊坞窗图像错误
我正在尝试使用合成作为docker容器的elastalert。 以下是我的dokcer-compose文件中的elastalert定义:elastalert:
image: ivankrizsan/elastalert container_name: elastalert restart: unless-stopped privileged: true links: - es:elasticsearchhost ports: - "3030:3030" cap_add: - SYS_TIME - SYS_NICE volumes: - /etc/elastalert/config:/opt/config - /etc/elastalert/rules:/opt/rules - /etc/elastalert/logs:/opt/logs - /etc/elastalert:/opt/elastalert environment: - ELASTICSEARCH_HOST=es - ELASTICSEARCH_PORT=9200
我得到以下错误:
容器时区未修改
{
“name”:“Stunner”,“cluster_name”:“elasticsearch”,“cluster_uuid”:“jqqJxdQZRP6cLJPBd0Usdg”,“version”:{“number”:“2.4.5”,“build_hash”:“c849dd13904f53e63e88efc33b2ceeda0b6a1276”“build_timestamp” :“2017-04-24T16:18:17Z”,“build_snapshot”:false,“lucene_version”:“5.5.4”},
“标语”:“你知道,搜索”
}
在Elasticsearch中创建Elastalert索引
回溯(最近一次通话最后):
文件“/ usr / bin / elastalert-create-index”,第6行,来自pkg_resources import load_entry_point
在@_call_aside中的文件“/usr/lib/python2.7/site-packages/pkg_resources/init.py”,第3019行
文件“/usr/lib/python2.7/site-packages/pkg_resources/init.py”,行3003,在_call_aside f(args,* kwargs)
文件“/usr/lib/python2.7/site-packages/pkg_resources/init.py”,行3032,在_initialize_master_working_set working_set = WorkingSet._build_master()
文件“/usr/lib/python2.7/site-packages/pkg_resources/init.py”,第655行,在_build_master ws.require(requires)
文件“/usr/lib/python2.7/site-packages/pkg_resources/init.py”,行963,在require needed = self.resolve(parse_requirements(requirements))
文件“/usr/lib/python2.7/site-packages/pkg_resources/init.py”,第849行,解析raise分配不合逻辑(req,requirers)
pkg_resources.DistributionNotFound:未找到'elasticalert'分发,并且是应用程序所需的
请帮忙。
我能够解决这个问题。 docker-compose配置为我工作:
elastalert:
image: ivankrizsan/elastalert container_name: elastalert restart: unless-stopped privileged: true links: - es:elasticsearchhost cap_add: - SYS_TIME - SYS_NICE volumes: - /etc/elastalert/config:/opt/config - /etc/elastalert/rules:/opt/rules - /etc/elastalert/logs:/opt/logs environment: - ELASTICSEARCH_HOST=es - ELASTICSEARCH_PORT=9200