====== Raspberry Pi を用いた監視 ====== {{indexmenu_n>15}} [[ja:documentation:pandorafms:start|Pandora FMS ドキュメント一覧に戻る]] ===== サポートバージョン ===== Pandora FMS Satellite Server can be installed on devices with ARM architecture and an operating system equivalent to or higher than Debian 12. Pandora FMS サテライトサーバは、ARM アーキテクチャを搭載し、Debian 12 と同等以上のオペレーティングシステムを搭載したデバイスにインストールできます。 ===== インストール ===== Download the ARM installation package [[https://packages.pandorafms.com/pandorafms/latest/pandorafms_satellite_server-latest.arm.tar.gz|from here]] and upload it to the ARM device (we will use the ''/tmp'' directory as an example for installation). ARM インストールパッケージを [[https://packages.pandorafms.com/pandorafms/latest/pandorafms_satellite_server-latest.arm.tar.gz|ここから]] ダウンロードし、ARM デバイスにアップロードします (インストール例として ''/tmp'' ディレクトリを使用します)。 Go to the directory where you uploaded the package: パッケージをアップロードしたディレクトリに移動します。 cd /tmp Uncompress the installation package: インストールパッケージを解凍します。 tar zxvf pandorafms_satellite_server-latest.arm.tar.gz Go to the directory generated by the decompression: 解凍によって生成されたディレクトリに移動します。 cd satellite_server Run the installation script: インストールスクリプトを実行します。 ./satellite_server_installer --install If you want to install it in a custom path other than the default one, you can indicate that path with this command instead of the previous one. For example, to install in ''/opt/pandorafms'': デフォルト以外のカスタムパスにインストールする場合は、前のコマンドの代わりにこのコマンドでそのパスを指定できます。たとえば、''/opt/pandorafms'' にインストールするには、次のように指定します。 ./satellite_server_installer --install --destdir /opt/pandorafms Finally, the ''server_ip'' token must be configured with the IP address of the PFMS Server to which the Satellite Server will connect [[:en:documentation:pandorafms:complex_environments_and_optimization:05_satellite#ks3_1_1|as well as the rest of the necessary parameters]]. 最後に、サテライトサーバが接続する PFMS サーバの IP アドレスを設定する ''server_ip'' トークンおよび、[[:ja:documentation:pandorafms:complex_environments_and_optimization:05_satellite#ks3_1_1|およびその他の必要なパラメータ]]を設定する必要があります。 ==== NetFlow® プローブ ==== Its operation is based on the use of several components: その動作は、いくつかの構成要素の使用に基づいています。 * A **NetFlow** compatible device, usually network hardware like a switch or router, that generates information packets or a [[#ks2_1_1|NetFlow]] probe. * A NetFlow collector, which receives the packets generated by the previous device, storing and processing them. It is usually a tool or server with these capabilities. * NetFlow 互換デバイスは、通常はスイッチやルーターなどのネットワークハードウェアで、情報パケットまたは [[#ks2_1_1|NetFlow]] プローブを生成します。 * NetFlow コレクターは、前のデバイスによって生成されたパケットを受信し、保存および処理します。通常は、これらの機能を備えたツールまたはサーバです。 Pandora FMS uses an OpenSource tool called **nfcapd** to process all NetFlow traffic. This daemon is automatically started by the Pandora FMS Server. This system stores data in binary files in a specific location. **nfcapd** must be installed on the system before being able to work with NetFlow in Pandora FMS. The default **nfcapd** daemon listens on port ''9995/UDP'', so it must be taken into account if you have firewalls to open this port and configure NetFlow probes. Pandora FMS は、すべての NetFlow トラフィックを処理するために **nfcapd** というオープンソースツールを使用します。このデーモンは、Pandora FMS サーバによって自動的に起動されます。このシステムは、データを特定の場所にあるバイナリファイルに保存します。Pandora FMS で NetFlow を使用するには、システムに **nfcapd** をインストールする必要があります。デフォルトの **nfcapd** デーモンはポート '9995/UDP' で待ち受けるため、ファイアウォールでこのポートを開放し、NetFlow プローブを設定する必要があることを考慮する必要があります。 === ソフトウエア NetFlow プローブ === If you do **not** have a router with built-in NetFlow but traffic "passes" through a Linux® system, you can install software that acts as a probe and sends NetFlow traffic information to the collector. In Linux, there is a program called **fprobe** that captures traffic and forwards it to a NetFlow server. With it, NetFlow traffic can be generated from all network traffic passing through its interfaces. NetFlow 機能を内蔵したルータをお持ちでない場合でも、トラフィックが Linux® システムを通過する場合は、プローブとして機能し、NetFlow トラフィック情報をコレクターに送信するソフトウェアをインストールできます。Linux には、トラフィックをキャプチャして NetFlow サーバに転送する **fprobe** というプログラムがあります。これを使用すると、インターフェースを通過するすべてのネットワークトラフィックから NetFlow トラフィックを生成できます。 First, **fprobe** must be installed: まず、**fprobe** をインストールする必要があります。 apt-get install fprobe At the time of installation, it will ask which interface you need to monitor and to which IP address and port number to send the collected information. It can be reconfigured at any time with: インストール時に、監視対象のインターフェースと、収集した情報を送信する IP アドレスおよびポート番号を選択するよう求められます。以下のコマンドでいつでも再設定できます。 /usr/sbin/fprobe -i -fip : //In the following model//, all traffic from the ''eth0'' interface will be sent to the NetFlow collector listening on port ''9995'' of the IP address ''192.168.70.185'': //以下のモデルでは、//''eth0'' インターフェースからのすべてのトラフィックは、IP アドレス ''192.168.70.185'' のポート ''9995'' で待機している NetFlow コレクターに送信されます。 /usr/sbin/fprobe -i eth0 -fip 192.168.70.185:9995 Once traffic is generated, you can see statistics of this traffic in the NetFlow collector with the command: トラフィックが生成されると、NetFlow コレクタで以下のコマンドを使用してそのトラフィックの統計情報を確認できます。 nfdump -R /var/spool/pandora/data_in/netflow NetFlow must be enabled to be accessible from the Operation and Administration menus: [[:en:documentation:pandorafms:monitoring:18_netflow#ks2_5_1|Enable NetFlow]]. NetFlow は、操作メニューと管理メニューからアクセスできるように有効にする必要があります: [[:ja:documentation:pandorafms:monitoring:18_netflow#ks2_5_1|NetFlow を有効にする]]。 Once NetFlow is configured, Pandora FMS Server must be restarted to start the **nfcapd** server. This must be correctly installed before attempting to start it. **Check the server logs if you have any doubts**. NetFlow の設定が完了したら、**nfcapd** サーバを起動するために Pandora FMS サーバを再起動する必要があります。起動する前に、nfcapd が正しくインストールされていることを確認してください。**不明な点がある場合は、サーバログを確認してください。** [[ja:documentation:pandorafms:start|Pandora FMS ドキュメント一覧に戻る]] ===== (OBSOLETE) ===== ==== SD カードフラッシュイメージ ==== === Raspberry 用 Pandora FMS 公式イメージのダウンロード === The initial step for installing it is to download the official Pandora FMS image for raspberry from the official download page: インストールの最初のステップは、公式ダウンロードページから Raspberry 用の公式 Pandora FMS イメージをダウンロードすることです。 https://sourceforge.net/projects/pandora/files/Raspberry-PandoraFMS/ Once the ''.img'' file is downloaded, flash it onto your SD card of at least 4gb. ''.img'' ファイルをダウンロードしたら、少なくとも 4 GB 以上の SD カードに書き込みます。 === Etcher のダウンロード === To flash the image, use the Etcher software that can be downloaded at イメージを書き込むには、ダウンロードできる Etcher ソフトウェアを使用します。 https://etcher.balena.io/ It works similarly on both Windows® and Linux®. Windows® と Linux® の両方で動作します。 === SD カードへのイメージ書き込み手順 === Insert the SD card into your computer which should have a special port for those kinds of devices. Execute Etcher. SD カードスロットがあるコンピュータに SD カードを挿入します。Etcher を実行します。 Click **Select image**. This will open the file explorer to select the previously downloaded Pandora FMS image. **Select image** をクリックします。ファイルエクスプローラーが開き、先ほどダウンロードした Pandora FMS イメージを選択できます。 Select the SD card inserted in the computer. If the SD card is the one that appears by default, leave it as it is and if not, click **Change** and select the desired SD card. コンピュータに挿入されている SD カードを選択します。デフォルトで表示される SD カードの場合はそのままにし、そうでない場合は **Change** をクリックして目的の SD カードを選択します。 {{ :wiki:etcher2.png }} Click **Flash!** to mount the image on the card. **Flash!** をクリックして、カードをマウントします。 Then, remove the card securely according to your OS instructions. 次に、OS の指示に従ってカードを安全に取り外します。 ==== ハードウエア接続 ==== Thorough this step, all the components will be connected to power up the Raspberry: この手順により、すべてのコンポーネントが接続され、Raspberry の電源がオンになります。 * Insert the SD card into the slot at the bottom of the box. * Connect the keyboard to any USB port * Connect the HDMI wire to the Raspberry monitor and HDMI port. * Connect the device to the power supply. * SDカードをボックス底部のスロットに挿入します。 * キーボードを任意のUSBポートに接続します。 * HDMIケーブルをRaspberryモニターとHDMIポートに接続します。 * デバイスを電源に接続します。 ==== ネットワーク接続 ==== The monitor will display how the device starts and an installer where you can select which interface you wish to configure. モニターには、デバイスの起動方法と、設定するインターフェイスを選択できるインストーラーが表示されます。 === DHCP === Select ''Eth0'' to configure the wired network interface: 有線ネットワークインターフェイスを設定するには、''Eth0'' を選択します。 It will ask whether you want to change the Eth0 interface settings. Click **Yes** Eth0 インターフェース設定を変更するかどうかを尋ねられます。**Yes** をクリックしてください。 Select **DHCP** if there is a DHCP server in the network ネットワークに DHCP サーバがある場合は **DHCP** を選択してください。 Then, a message will appear saying that the wired network has been correctly configured. すると、有線ネットワークが正しく設定されたことを示すメッセージが表示されます。 === 静的 === Select **IP STATIC** if you wish to configure the wired interface manually. 有線インターフェースを手動で設定する場合は、**IP STATIC** を選択します。 Enter the Raspberry's static IP. Raspberry の固定 IP を入力します。 Enter the network's **Gateway.** ネットワークの **Gateway** を入力します。 Enter the network mask. ネットマスクを入力します。 Enter the public DNS. 公開 DNS を入力します。 You will get a message that the configuration has been successfully completed. 設定が正常に完了したことを示すメッセージが表示されます。 === ワイヤレス DHCP === Select **Wlan0** to configure the wireless network interface ワイヤレスネットワークインターフェースを設定するには、**Wlan0** を選択します。 {{ :wiki:wifi1.png }} It will ask whether you wish to change the **Wlan0** interface configuration. Click **Yes.** **Wlan0** インターフェースの設定を変更するかどうかを尋ねられます。**Yes** をクリックしてください。 Select **DHCP** if there is a DHCP server in the network. ネットワーク内に DHCP サーバがある場合は、**DHCP** を選択します。 Choose the name of the access point from the provided list. Enter the password of the access point. 表示されたリストからアクセスポイントの名前を選択します。アクセスポイントのパスワードを入力します。 You will get a message that the configuration was successful. 設定が成功したことを示すメッセージが表示されます。 === ワイヤレス静的 === * Select **WIFI STATIC** if you wish to configure the wired interface manually. * Choose the name of the access point from the provided list. Enter the password of the access point. * Enter the device static IP address. * Enter the network mask. * Enter the access point **Gateway.** * You will receive a message saying the configuration was successful. * ワイヤレスインターフェースを手動で設定する場合は、**WIFI STATIC** を選択してください。 * 表示されたリストからアクセスポイントの名前を選択します。アクセスポイントのパスワードを入力してください。 * デバイスの固定 IP アドレスを入力してください。 * ネットワークマスクを入力してください。 * アクセスポイントの **Gateway** を入力してください。 * 設定が成功したことを示すメッセージが表示されます。 ==== エージェント/サテライト設定 ==== === エージェント === * To install the agent, select **AGENT** from the menu. * It will ask for the IP address of the Pandora FMS server the agent must point to. * Enter the **existing group** in the Pandora FMS server you wish to add the agent to. * エージェントをインストールするには、メニューから **AGENT** を選択します。 * エージェントが接続する Pandora FMS サーバの IP アドレスを入力します。 * エージェントを追加する Pandora FMS サーバの **既存グループ** を入力します。 === サテライト === * To install the satellite, select **SATELLITE** from the menu. * Enter the IP address of Pandora FMS server the agent must point to. * Enter the network range you wish to monitor along with its mask. * Enter the community or list of SNMP communities of the devices in your network. * Enter the user or list of users to make WMI queries to the computers on your network. * サテライトをインストールするには、メニューから **SATELLITE** を選択します。 * エージェントが接続する Pandora FMS サーバの IP アドレスを入力します。 * 監視するネットワーク範囲とそのマスクを入力します。 * ネットワーク内のデバイスのコミュニティまたは SNMP コミュニティのリストを入力します。 * ネットワーク上のコンピュータに WMI クエリを実行するユーザまたはユーザのリストを入力します。 ===== 追加処理 ===== ==== Pandora RC クライアント設定 ==== Edit the file with the **nano** text editor: **nano** テキストエディタでファイルを編集します。 /etc/ehorus/ehorus.conf Replace the ''eh_user'' token with your Pandora RC user. In line ''#password secret'' delete the sharp that indicates the beginning of the comment (//uncomment the line//) and replace the word "secret" by a password to access your agent from Pandora RC. ''eh_user'' トークンを Pandora RC ユーザ名に置き換えてください。''#password secret'' 行のコメント開始を示すシャープを削除し(//この行のコメントを解除//)、Pandora RC からエージェントにアクセスするためのパスワードに "secret" を置き換えてください。 {{ :wiki:ehorus_conf.png }} To see the graphical environment, install the **x11vnc** dependency: グラフィカル環境を表示するには、依存パッケージ **x11vnc** をインストールします。 apt-get install x11vnc Start Pandora RC service with: Pandora RC サービスを開始するには次のようにします。 systemctl start pandorarc_agent_daemon ==== NetFlow プローブ ==== Its operation is based on the use of several components: この動作は、いくつかのコンポーネントの使用に基づいています。 * A device with **NetFlow **compatibility, usually a switch or router type network hardware that generates information packets, or a NetFlow probe. * A NetFlow collector, which receives the packets generated by the previous device, storing and processing them. It is usually a tool or server with these features. * NetFlow 対応デバイス。通常は、情報パケットを生成するスイッチやルータ型のネットワークハードウェア、または NetFlow プローブです。 * NetFlow コレクター。前段のデバイスによって生成されたパケットを受信し、保存および処理します。通常は、これらの機能を備えたツールまたはサーバです。 Pandora FMS uses an OpenSource tool called **nfcapd** to process all NetFlow traffic. This daemon is automatically launched by Pandora FMS server. This system stores data in binary files, in a certain location. Install **nfcapd** on your system before working with NetFlow in Pandora FMS. The default **nfcapd** daemon listens on port 9995/UDP by default, so keep this in mind if you have firewalls to open this port and when configuring NetFlow probes. Pandora FMS は、すべての NetFlow トラフィックを処理するために、**nfcapd** と呼ばれるオープンソースツールを使用しています。このデーモンは Pandora FMS サーバによって自動的に起動されます。このシステムは、データをバイナリファイルで特定の場所に保存します。Pandora FMS で NetFlow を使用する前に、システムに **nfcapd** をインストールしてください。デフォルトの **nfcapd** デーモンは、ポート 9995/UDP で待ち受けます。ファイアウォールでこのポートを開放する場合や、NetFlow プローブを設定する場合は、この点に注意してください。 === ソフトウエアによる NetFlow プローブ === If you do not have a NetFlow router, but your traffic "goes" through a Linux system, you can install a software that works as a probe and sends NetFlow traffic information to the collector. In Linux, there is a program called **fprobe** that captures traffic and forwards it to a NetFlow server. With that you can generate NetFlow traffic, from all network traffic going through your interfaces. NetFlow ルータを持っていない場合でも、トラフィックが Linux システムを経由する場合は、プローブとして動作し、NetFlow トラフィック情報をコレクターに送信するソフトウェアをインストールできます。Linuxには、トラフィックをキャプチャして NetFlow サーバに転送する **fprobe** というプログラムがあります。このプログラムを使用すると、インターフェースを通過するすべてのネットワークトラフィックから NetFlow トラフィックを生成できます。 First, install fprobe: 最初に fprobe をインストールします。 apt-get install fprobe It will ask which interface must be monitored and to which ip:port the information must be sent to. In case it does not ask, run the following command: 監視するインターフェースと、情報をどの IP:ポート に送信するかを尋ねられます。尋ねられなかった場合は、次のコマンドを実行してください。 /usr/sbin/fprobe -i -fip > In the following example, all traffic from the eth0 interface will be sent to the NetFlow collector listening on port 9995 of IP 192.168.70.185: 次の例では、eth0 インターフェイスからのすべてのトラフィックが、IP 192.168.70.185 のポート 9995 でリッスンしている NetFlow コレクターに送信されます。 /usr/sbin/fprobe -i eth0 -fip 192.168.70.185:9995 Once traffic is generated, you can see the statistics of this traffic on the NetFlow collector with this command: トラフィックが生成されると、次のコマンドを使用して NetFlow コレクターでこのトラフィックの統計情報を表示できます。 nfdump -R /var/spool/pandora/data_in/netflow NetFlow must be enabled to be accessible from the Operation and Administration menus: [[:en:documentation:pandorafms:monitoring:18_netflow#configuration|Enable NetFlow]] 操作および管理メニューからアクセスするには、NetFlow を有効にする必要があります: [[:ja:documentation:pandorafms:monitoring:18_netflow#configuration|NetFlow を有効にする]] Once NetFlow is configured, restart Pandora FMS server to boot the **nfcapd** server. It must be properly installed before attempting to start it. Check the server logs for any questions. NetFlow の設定が完了したら、Pandora FMS サーバを再起動して **nfcapd** サーバを起動してください。起動する前に、正しくインストールされている必要があります。サーバのログに不明な点がないか確認してください。 === ポートミラーリングでの Netflow プローブ === Explained in section: [[:en:documentation:pandorafms:monitoring:18_netflow#configuration|Netflow Port Mirroring]] 次の章で説明しています: [[:ja:documentation:pandorafms:monitoring:18_netflow#configuration|Netflow ポートミラーリング]] [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]