在【Elasticsearch】ES 8.0.0中使用cerebro

从Elasticsearch 8.0.0版本开始,首次启动时会自动进行安全相关设置,连接cerebro需要额外步骤,请注意记录。

环境

    • Windows10

 

    • PowerShell 5.1.19041.1320

 

    • Elasticsearch 8.0.0

 

    cerebro 0.9.4

Elasticsearch第一次启动

PS C:\elasticsearch-8.0.0\bin> .\elasticsearch.bat

当您首次启动控制台时,会显示以下与安全相关的消息,请记下其内容。

------------------------------------------------------------------------------------------------------------------------
-> Elasticsearch security features have been automatically configured!
-> Authentication is enabled and cluster connections are encrypted.

->  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
  xxxxxxxxxxxxxxxxxxxx

->  HTTP CA certificate SHA-256 fingerprint:
  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

->  Configure Kibana to use this cluster:
* Run Kibana and click the configuration link in the terminal when Kibana starts.
* Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

->  Configure other nodes to join this cluster:
* On this node:
  - Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  - Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  - Restart Elasticsearch.
* On other nodes:
  - Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
------------------------------------------------------------------------------------------------------------------------

修改cerebro的application.conf文件

新增以下内容。

play.ws.ssl {
  trustManager = {
    stores = [
      { type = "PEM", path = "[Elasticsearchのインストールフォルダ]\\config\\certs\\http_ca.crt" }
    ]
  }
}

如果Elasticearch和cerebro的服务器是分开的,那么需要将http_ca.crt复制到cerebro服务器中,并设置相应的路径。未经确认。

大脑启动,登录

image.png

请在被要求输入用户和密码时,填写以下内容。
– elastic
– 在Elasticsearch首次启动时显示的“该elastic用户的密码”下方的密码。

image.png

我已成功登录。
就这样。

广告
将在 10 秒后关闭
bannerAds