我已经下载了Elasticsearch elasticsearch-7.7.1-linux-x86_64.tar.gz,kibana-7.7.1-linux-x86_64.tar.gz并解压缩了它们。
通过以下方式启动它们
./bin/elastisearch
./bin/kibana
in their respective folders
我的elasticsearch已启动并在9200后发布,而我的Kibana在端口5601上运行。
这是http:// localhost:9200的输出
{
"name" : "nineleaps-ThinkPad-L470",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "xCa4JUnaRjWyHFyq1IAKoQ",
"version" : {
"number" : "7.7.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423",
"build_date" : "2020-05-28T16:30:01.040088Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
我已经安装了elastalert-kibana-plugin,并且还可以在kibana仪表板中查看该插件。
elastalert-kibana-plugin要求elastalert在端口3030上运行。
所以,我拉了一个docker image bitsensor / elastalert并根据以下文档进行了更改。
bitsensor/elastalert installation
当我将docker image运行为
docker run -it -p 3030:3030 bitsensor/elastalert
然后我遇到以下错误:
09:12:26.403Z ERROR elastalert-server:
ProcessController: WARNING:elasticsearch:GET http://localhost:9200/ [status:N/A request:0.002s]
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.1-py2.7.egg/elasticsearch/connection/http_requests.py", line 111, in perform_request
response = self.session.send(prepared_request, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f65551e3e90>: Failed to establish a new connection: [Errno 111] Connection refused',))
09:12:27.410Z ERROR elastalert-server:
ProcessController: WARNING:elasticsearch:GET http://localhost:9200/ [status:N/A request:0.006s]
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.1-py2.7.egg/elasticsearch/connection/http_requests.py", line 111, in perform_request
response = self.session.send(prepared_request, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6555033150>: Failed to establish a new connection: [Errno 111] Connection refused',))
09:12:37.437Z ERROR elastalert-server:
ProcessController: timeout=timeout,
File "/usr/lib/python2.7/site-packages/elasticsearch-7.0.1-py2.7.egg/elasticsearch/connection/http_requests.py", line 127, in perform_request
09:12:37.437Z ERROR elastalert-server:
ProcessController: raise ConnectionError("N/A", str(e), e)
elasticsearch.exceptions.ConnectionError: ConnectionError(HTTPConnectionPool(host='localhost', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6555033110>: Failed to establish a new connection: [Errno 111] Connection refused',))) caused by: ConnectionError(HTTPConnectionPool(host='localhost', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6555033110>: Failed to establish a new connection: [Errno 111] Connection refused',)))
09:12:37.476Z ERROR elastalert-server: ProcessController: ElastAlert exited with code 1
09:12:37.476Z INFO elastalert-server: Server: Stopping server
09:12:37.477Z INFO elastalert-server: ProcessController: ElastAlert is not running
09:12:37.477Z INFO elastalert-server: Server: Server stopped. Bye!
任何人都可以提供解决方案。