LoginSignup
1
0

More than 5 years have passed since last update.

リモートのphoenixで作成したアプリをobserverでモニタリングする

Last updated at Posted at 2017-05-10

概要

リモートのphoenixアプリをobserverでモニタリングする方法を記載します。

下記の記事を参考にしました。
http://qiita.com/ohr486/items/16066c275e9e37a0fb5a

phoenixのコマンドで起動するかの違いだけなので、内容はほぼ同じです。
適宜変更が必要な値は【】で囲ってます。

方法

1. リモートサーバー上でcookieを指定しアプリを起動(リモートで実行)

elixir --name root@127.0.0.1 --cookie phoenix_cookie --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -pa _build/prod/consolidated -S mix phoenix.server

※rootで実行しました

2. ローカルからリモートサーバーへポートフォワーディング(ローカルで実行)

ssh -N -L 9001:localhost:9001 -L 4369:localhost:4369 【sshユーザー名】@【グローバル
IP】

3. リモートサーバー上のErlangVMをモニタリング(ローカルで実行)

erl -name monitor@127.0.0.1 -setcookie phoenix_cookie -run observer
1
0
1

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
1
0