LoginSignup
0
0

More than 5 years have passed since last update.

Graylog2.4 を Multi-node で構築

Last updated at Posted at 2018-08-01

Graylog2.4 を Multi-node で構築

構成

http://docs.graylog.org/en/2.4/pages/architecture.html#bigger-production-setup
をAWSを利用してつくる

ALB(https終端) 
    |
    v
EC2(nginx + graylog * mongoDB)x3 
    |
    v
ES(3インスタンス)
  • ALB : https終端とロードバランス
  • EC2 3台
    • nginx (port 80でlistenしてproxy)
    • graylog (multi node)
    • MongoDB (ReplicaSet)
  • ElasticSearch Searvice
    • インスタンス3台

ポイント

全般

  • MongoDB ReplicaSet の要件で、3台が最低台数

MongoDB ReplicaSet

https://docs.mongodb.com/manual/tutorial/deploy-replica-set/ に従って設定すればOK

なお、レプリケーションしないのにレプリケーションの設定をいれると、動かないので注意

replication:
   replSetName: "rs0"

Elasticsearch cluster

ALB

Nginx

Graylog Multi-node

設定

  • 1台だけ is_master = true 、それ以外は is_master = false にする
    • 全台 is_master = false だとgraylogが起動しなかった。
    • 複数台 is_master = true は試していない
  • rest_listen_uri = http://0.0.0.0:9000/api/ にする
  • rest_transport_uri はprivate IPを指定する
  • web_listen_uri = http://0.0.0.0:9000/ にする
    • localのnginx経由でも、http://127.0.0.1:9000/ だと駄目
    • rest_listen_uri と違うと別ポートを要求されるので、一緒にする

1台殺してみた結果

  • 1台殺しても、何もしなくてもちゃんと動いた
    • is_master = true のノード殺しても大丈夫
      • でも一部操作がずっと読み込み中になったので、できない操作はあるのかもしれない
      • 特に他のものがmasterに昇格するわけではなさそう。
    • ログの取り込みも継続して動いた
  • 復帰させたら、何もしなくてもちゃんと戻った
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