0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Elasticsearch】ES 8.0.0でcerebroを使用

Posted at

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のサーバ内へコピーしてきたうえでそこへのパスを各必要がありそう。未確認。

cerebro起動、ログイン

httpsでElasticsearchへアクセス。
image.png

ユーザとパスワードを聞かれるので以下を入力。

  • elastic
  • Elasticsearch初回起動時に表示された「Password for the elastic user」の下のパスワード

image.png

ログインできた。
以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?