差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:technical_annexes:11_mod_proxy [2024/06/04 08:06] – [リバースプロキシでのメタコンソール設定] junichi | ja:documentation:pandorafms:technical_annexes:11_mod_proxy [2024/11/16 22:39] (現在) – [概要] junichi | ||
---|---|---|---|
行 4: | 行 4: | ||
[[ja: | [[ja: | ||
- | <WRAP center round important 60%> | ||
- | This article uses CentOS 6, an operating system that has completed its End-of-life product cycle. | + | ===== 概要 ===== |
- | </ | + | Let us suppose that Pandora FMS provides its service to clients that only have direct access to the Command Center (Metaconsole), |
- | <WRAP center round important 60%> | + | Pandora FMS が、コマンドセンター (メタコンソール) に直接アクセスできるクライアントにのみサービスを提供しているとします。コマンドセンターのみがパブリック IP で外部に公開されており、その下のノードには直接アクセスできない想定です。 |
- | この記事では、サポート終了となっているオペレーティングシステムである CentOS 6 を使用しています。 | + | {{ : |
- | </ | + | **Command Center (Metaconsole)**: |
- | ===== 概要 ===== | + | **コマンドセンター(メタコンソール): |
- | ユーザは、グローバル | + | Hostname: '' |
+ | ホスト名: | ||
+ | Pandora FMS Command Center (Metaconsole) path: | ||
- | {{ wiki:mod_proxy1.png? | + | Pandora FMS コマンドセンター (メタコンソール) パス: |
+ | < | ||
+ | http:// | ||
+ | </ | ||
+ | Public URL: | ||
+ | 公開 URL: | ||
- | **メタコンソール:** | + | < |
+ | http:// | ||
- | ホスト名: | + | </file> |
+ | **Node 1:** | ||
**ノード 1:** | **ノード 1:** | ||
- | ホスト名: node1.artica.es、192.168.1.0 (プライベートIP)、 http:// | + | Hostname: node1.es, 192.168.1.11 (Private |
+ | ホスト名: | ||
+ | |||
+ | Pandora FMS node1 path: | ||
+ | |||
+ | Pandora FMS node1 パス: | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | Public URL: | ||
+ | |||
+ | 公開 URL: | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Node 2**: | ||
**ノード 2:** | **ノード 2:** | ||
- | ホスト名: | + | Hostname: node2.es, 192.168.1.12 (Private IP address). |
+ | |||
+ | ホスト名: | ||
+ | |||
+ | Pandora FMS node2 path: | ||
+ | |||
+ | Pandora FMS node2 パス: | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | Public URL: | ||
+ | |||
+ | 公開 URL: | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Nod3 3**: | ||
**ノード 3:** | **ノード 3:** | ||
- | ホスト名: node3.artica.es、 192.168.1.12 (プライベートIP)、 http:// | + | Hostname: node3.es, 192.168.1.13 (Private |
- | ユーザは、メタコンソールを通してすべてのノードにアクセスする必要がありますが、ノードは内部のIPのため初期設定時にはアクセスできません。 | + | ホスト名: node3.es、 192.168.1.13 (プライベートIP) |
- | まずは、すべてのノードへアクセスできるように、apache の mod_proxy モジュールをメタコンソールサーバで有効化します。以下では CentOS 6.7 と apache 2.2 を想定しています。 | + | |
- | ==== メタコンソール設定 ==== | + | Pandora FMS node1 path: |
- | /etc/hosts ファイルに、各ノードの情報を次のように記載します。 | + | |
+ | Pandora FMS node3 パス: | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | Public URL: | ||
+ | |||
+ | 公開 URL: | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | The client will need to have access through the Command Center (Metaconsole) to all the nodes, but initially it cannot, since these have internal IP addresses and from outside there is no connectivity with them. To be able to do this, the mod_proxy module is enabled in the **apache** of the Command Center (Metaconsole) so that it has direct access to all nodes. The indicated configuration is on Apache 2 . | ||
+ | |||
+ | ユーザは、コマンドセンター(メタコンソール)を通してすべてのノードにアクセスする必要がありますが、ノードは内部のIPのため初期設定時にはアクセスできません。 | ||
+ | まずは、すべてのノードへアクセスできるように、**apache** の mod_proxy モジュールをコマンドセンター(メタコンソール)サーバで有効化します。以下では apache 2 を想定しています。 | ||
+ | |||
+ | |||
+ | <wrap #ks1_1 /> | ||
+ | |||
+ | ==== コマンドセンター(メタコンソール)設定 ==== | ||
+ | |||
+ | First of all add in the file ''/ | ||
+ | |||
+ | '' | ||
< | < | ||
- | 127.0.0.1 | + | 127.0.0.1 |
- | 192.168.10.1 node1.artica.es | + | |
- | 192.168.10.2 node2.artica.es | + | |
- | 192.168.10.3 node3.artica.es | + | |
</ | </ | ||
- | apache で mod_proxy モジュールを有効化するには、apache の設定ファイル(httpd.conf)を開き、次の行が有効になっているか確認します。 | + | To enable '' |
+ | |||
+ | apache で '' | ||
< | < | ||
- | LoadModule proxy_module modules/ | + | LoadModule proxy_module modules/ |
- | LoadModule proxy_balancer_module modules/ | + | |
- | LoadModule proxy_ftp_module modules/ | + | |
- | LoadModule proxy_http_module modules/ | + | |
- | LoadModule proxy_ajp_module modules/ | + | |
- | LoadModule proxy_connect_module modules/ | + | |
</ | </ | ||
- | 次の設定を httpd.conf に追加します。 | + | Once done, the following lines are added to the file '' |
+ | |||
+ | 次の設定を | ||
< | < | ||
- | ProxyRequests Off | + | ProxyRequests Off |
- | ProxyPreserveHost On | + | |
- | ProxyPass /node1 http:// | + | |
- | ProxyPassReverse /node1 http:// | + | |
- | ProxyPass /node2 http:// | + | |
- | ProxyPassReverse /node2 http:// | + | |
- | ProxyPass /node3 http:// | + | |
- | ProxyPassReverse /node3 http:// | + | |
</ | </ | ||
- | この設定により、http:// | + | By this we are indicating that when someone accesses |
- | https を有効化している場合は、以下も追加します。 | + | これにより、以下にアクセスすると、 |
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | will automatically redirect you to | ||
+ | |||
+ | 以下にリダイレクトされます。 | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | and so on with all nodes. If HTTPS is enabled, this configuration should be added: | ||
+ | |||
+ | 他のノードも同様です。HTTPS | ||
< | < | ||
- | SSLEngine on | + | SSLEngine on |
- | SSLProxyEngine On | + | |
- | SSLCertificateFile / | + | |
- | SSLCertificateKeyFile / | + | |
- | ProxyRequests Off | + | |
- | ProxyPreserveHost On | + | |
- | ProxyPass /node1 https:// | + | |
- | ProxyPassReverse /node1 https:// | + | |
- | ProxyPass /node2 https:// | + | |
- | ProxyPassReverse /node2 https:// | + | |
- | ProxyPass /node3 https:// | + | |
- | ProxyPassReverse /node3 https:// | + | |
</ | </ | ||
- | ノード1、2、3 の apache の ca.key | + | Being the certificates '' |
- | 最後のステップとして、メタコンソールの設定を行います。 | + | ノード1、2、3 |
- | **コンソールURL: | + | The last step to be performed is the configuration of the Command Center |
- | {{ wiki: | + | 最後のステップとして、コマンドセンター(メタコンソール)の設定を行います。特定の方法で作成する必要がある唯一のパラメータは次のとおりです。 |
- | メタコンソールからノードへの接続を設定したあとは、次にそれぞれのノードの設定を行います。 | + | **Console URL:** Indicate the Public URLs of each one of the nodes that will match with the link configured in the httpd.conf file for each one of the nodes. |
+ | |||
+ | **コンソール URL:** 各ノードの httpd.conf ファイルでの設定と一致する各ノードの公開 URL を指定します。 | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Once the Command Center (Metaconsole) is configured to contact the nodes, the next step is to configure each node. | ||
+ | |||
+ | コマンドセンター(メタコンソール)からノードへの接続を設定したあとは、次にそれぞれのノードの設定を行います。 | ||
+ | |||
+ | <WRAP center round important 90%> | ||
+ | |||
+ | The links will vary in each case if we are using HTTPS instead of HTTP. | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round important 90%> | ||
- | <WRAP center round important 60%> | ||
http の代わりに https を利用している場合は、それぞれリンク先が異なります。 | http の代わりに https を利用している場合は、それぞれリンク先が異なります。 | ||
+ | |||
</ | </ | ||
+ | |||
+ | <wrap #ks1_1_1 /> | ||
=== ノードの設定 === | === ノードの設定 === | ||
- | それぞれのノードで行う設定は、コンソールの設定で " | ||
- | この | + | The only special configuration that must be added to each of the nodes is the Public |
- | ノード1 の例: | + | |
- | {{ wiki: | + | 各ノードに追加する必要がある唯一の特別な設定は、コンソールセットアップの公開 URL です。この URL は、最初に示したシナリオの各ケースで示されている公開 URL を使用して設定する必要があります。ノード 1 の例: |
+ | |||
+ | {{ :wiki: | ||
+ | |||
+ | <WRAP center round important 90%> | ||
+ | |||
+ | The links will vary in each case if you are using HTTPS instead of HTTP. | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round important 90%> | ||
- | <WRAP center round important 60%> | ||
http の代わりに https を利用している場合は、それぞれリンク先が異なります。 | http の代わりに https を利用している場合は、それぞれリンク先が異なります。 | ||
+ | |||
</ | </ | ||
[[ja: | [[ja: | ||
+ |