差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:monitoring:18_netflow [2024/04/06 07:00] – [設定] junichi | ja:documentation:pandorafms:monitoring:18_netflow [2025/02/07 08:07] (現在) – [分散設定] junichi | ||
---|---|---|---|
行 165: | 行 165: | ||
== fprobe のインストール == | == fprobe のインストール == | ||
- | **fprobe** | + | The **fprobe** |
**fprobe** がトラフィックを取得し Netflow サーバへ送信します。インターフェイスを通過するすべてのトラフィックから、Netflow トラフィックを生成できます。 | **fprobe** がトラフィックを取得し Netflow サーバへ送信します。インターフェイスを通過するすべてのトラフィックから、Netflow トラフィックを生成できます。 | ||
- | To download the RPM package just run the following command, and then install | + | In Ubuntu 22 it is installed and configured with: |
- | RPM パッケージをダウンロードおよびインストールするには、以下のコマンドを用います。 | + | Ubuntu 22 では、次のようにインストールおよび設定します。 |
- | < | + | < |
- | wget http:// | + | sudo apt install fprobe |
- | yum install fprobe-1.1-2.el7.lux.x86_64.rpm | + | |
</ | </ | ||
- | For instance, executing this command, all '' | + | The installation offers |
- | たとえば、このコマンドを実行すると、すべての '' | + | インストールでは、デフォルトのインターフェースとして '' |
- | < | + | It will then query for the IP address and listening port of the device that will collect the data (in this case the **PFMS server**), e.g. '' |
- | / | + | |
- | </ | + | 次に、データを収集するデバイス (この場合は **PFMS サーバ**) の IP アドレスと待ち受けポート (例: '' |
- | Once the traffic | + | Once the installation |
- | トラフィックが生成されたら、次のコマンドでトラフィックの状態を見る事ができます。 | + | インストールが完了したら、操作をテストできます。 |
- | < | + | < |
- | nfdump -R / | + | sudo systemctl status fprobe |
</ | </ | ||
- | 次のような情報が表示されます。 | + | And it will return a response similar to this: |
- | < | + | そして、次のような応答が返されます。 |
- | Aggregated flows 1286 | + | |
- | Top 10 flows ordered by packets: | + | |
- | Date flow start Duration Proto Src IP Addr: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | Top 10 flows ordered by bytes: | + | {{ wiki:sudo_systemctl_status_fprobe.png }} |
- | Date flow start Duration Proto Src IP Addr: | + | |
- | 2011-12-22 20:48:15.057 1.347 TCP | + | To enable it at every system startup: |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20:46: | + | システムの起動ごとに有効にするには: |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20:48: | + | <code bash> |
- | 2011-12-22 20: | + | sudo systemctl enable fprobe |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | 2011-12-22 20: | + | |
- | Summary: total flows: 1458, total bytes: 5.9 M, total packets: 15421, avg bps: 49574, avg pps: 15, avg bpp: 399 | ||
- | Time window: 2011-12-22 20:40:46 - 2011-12-22 20:57:21 | ||
- | Total flows processed: 1458, Records skipped: 0, Bytes read: 75864 | ||
- | Sys: 0.006s flows/ | ||
</ | </ | ||
+ | To read the complete **fprobe** help: | ||
- | ここまでの動作確認ができたら、次はそれを利用できるようにするための Pandora FMS の設定です。 | + | 完全な **fprobe** ヘルプを読むには: |
+ | |||
+ | https:// | ||
+ | |||
+ | Once traffic has been generated, you can view traffic statistics in the NetFlow collector of the **PFMS server** with the command: | ||
+ | |||
+ | トラフィックが生成されると、次のコマンドを使用して、**PFMS サーバ** の NetFlow コレクターでトラフィック統計を表示できます。 | ||
+ | |||
+ | < | ||
+ | nfdump -R / | ||
+ | |||
+ | </ | ||
== pmacct のインストール == | == pmacct のインストール == | ||
行 385: | 行 374: | ||
* **Daemon interval**: It allows you to set the NetFlow daemon time interval to 10, 30 or 60 minutes. After making a change and applying it in the time selector, it is necessary to restart the server for this change to take effect. | * **Daemon interval**: It allows you to set the NetFlow daemon time interval to 10, 30 or 60 minutes. After making a change and applying it in the time selector, it is necessary to restart the server for this change to take effect. | ||
- | * **データ保存パス(Data storage path):** Netflow データが保存されるディレクトリです。ディレクトリ名のみを入力します。デフォルトは '' | + | * **データ保存パス(Data storage path):** Netflow データが保存されるディレクトリです。ディレクトリ名のみを入力します。デフォルトは '' |
* **デーモンバイナリパス(Daemon binary path): | * **デーモンバイナリパス(Daemon binary path): | ||
* **Nfdump バイナリパス(Nfdump binary path):** **nfdump** バイナリのパスです。 | * **Nfdump バイナリパス(Nfdump binary path):** **nfdump** バイナリのパスです。 | ||
行 412: | 行 401: | ||
ここで、'' | ここで、'' | ||
+ | |||
+ | <wrap #ks2_6 /> | ||
==== フィルタ ==== | ==== フィルタ ==== | ||
- | You may access | + | You may access |
- | **リソース(Resources)** > **NetFlow フィルタ(NetFlow Filters)** をクリックすることにより、作成および編集ができます。 | + | **リソース(Resources)** > **NetFlow フィルタ(NetFlow Filters)** をクリックすることにより、作成および編集ができます。このセクションには、変更または削除できる作成済みのフィルタのリストが含まれています。 |
- | {{ : | + | You may also create a filter right away from the **NetFlow live view**, saving the active filter as a new one. NetFlow filters can be " |
- | This section contains a list of already created filters which can be modified or deleted. | + | **NetFlow ライブビュー**からすぐにフィルタを作成し、アクティブなフィルタを新しいフィルタとして保存することもできます。 NetFlow フィルタには " |
- | ここには、変更または削除できる作成済みのフィルタの一覧が表示されます。 | + | === NetFlow 監視の有効化 === |
- | {{ wiki: | + | <WRAP center round info 60%> |
- | " | + | Version 770 or later. |
- | === フィルタ作成 === | + | </ |
- | Netflow フィルターの基本的な編集画面: | + | |
- | {{ : | + | <WRAP center round info 60%> |
- | この機能における設定可能な NetFlow フィルタは次のとおりです。 | + | バージョン 770 以降 |
- | * **Name: | + | </ |
- | * **Group: | + | |
- | * **Filter: | + | |
- | * **Aggregate by:** All traffic data can be grouped by one of the following criteria: | + | |
- | * **DST IP address**: Group traffic of each IP from a different source. | + | |
- | * **DST port**: Group traffic of each IP with a different target. | + | |
- | * **SRC IP address**: Group traffic of each port from a different source. | + | |
- | * **SRC Port**: Group traffic of each port with a different target. | + | |
- | * **名前(Name)**: | + | When creating the filter, filter monitoring can be activated by activating the //token// **Enable NetFlow monitoring**. |
- | * **グループ(Group)**: | + | |
- | * **フィルタ(Filter)**: | + | |
- | * **集約(Aggregate by)**: 通信が次の基準で集約されます: | + | |
- | * **宛先 IP(DST IP address)**: 異なる宛先 IP ごとに通信を表示します。 | + | |
- | * **宛先ポート(DST port)**: 異なる宛先ポートごとに通信を表示します。 | + | |
- | * **発信元 IP(SRC IP address)**: 異なる発信元 IP ごとに通信を表示します。 | + | |
- | * **発信元ポート(SRC Port)**: 異なる発信元ポートごとに通信を表示します。 | + | |
- | {{ : | + | フィルターを作成するときに、**Enable NetFlow monitoring** // |
- | == 例 == | + | * This allows creating an agent that monitors the traffic volume of this filter. |
- | 基本ウェブ通信フィルタの例: | + | * It creates a module that measures whether traffic from any IP address in this filter exceeds a certain threshold. |
+ | * A text module will be created with the traffic rate of each IP address within this filter every five minutes (the 10 most trafficked IP addresses). | ||
+ | * これにより、このフィルタのトラフィック量を監視するエージェントを作成できるようになります。 | ||
+ | * このフィルタ内のいずれかの IP アドレスからのトラフィックが特定のしきい値を超えているかどうかを測定するモジュールを作成します。 | ||
+ | * このフィルター内の各 IP アドレスのトラフィックレートを含むテキストモジュールが 5 分ごとに作成されます (最もトラフィックが多い 10 個の IP アドレス)。 | ||
+ | The parameters are as follows: | ||
- | {{ wiki: | + | パラメータは次の通りです。 |
+ | * **Maximum traffic value of the filter**: Specifies the maximum rate (in bytes per second) of filter traffic. It is then used to calculate the percentage of maximum traffic per IP address. | ||
+ | * **WARNING threshold for the maximum % of traffic for an IP**: If any IP address within the filter exceeds the set percentage, a WARNING status will be generated. | ||
+ | * **CRITICAL threshold for the maximum % of traffic for an IP**: If any IP address within the filter exceeds the set percentage, a CRITICAL status will be generated. | ||
+ | * **フィルタの最大トラフィック値(Maximum traffic value of the filter)**: フィルタトラフィックの最大レート (バイト/ | ||
+ | * **IP のトラフィックの最大 % の警告しきい値(WARNING threshold for the maximum % of traffic for an IP)**: フィルタ内のいずれかの IP アドレスが設定された割合を超えると、警告状態が生成されます。 | ||
+ | * **IP のトラフィックの最大 % の障害しきい値(CRITICAL threshold for the maximum % of traffic for an IP)**: フィルタ内のいずれかの IP アドレスが設定された割合を超えると、障害状態が生成されます。 | ||
- | 高度なイントラネット通信フィルタの例: | ||
- | |||
- | |||
- | |||
- | {{ wiki: | ||
- | |||
- | |||
- | |||
- | |||
- | 以下に、他のフィルタ例を示します。 | ||
- | |||
- | * 192.168.0.1 発または宛のトラフィックをキャプチャ: | ||
- | |||
- | host 192.168.0.1 | ||
- | |||
- | * 192.168.0.1 宛のトラフィックをキャプチャ: | ||
- | |||
- | dst host 192.168.0.1 | ||
- | |||
- | * 192.168.0.0./ | ||
- | |||
- | src net 192.168.0.0/ | ||
- | |||
- | * HTTP および HTTPS のトラフィックをキャプチャ: | ||
- | |||
- | (port 80) or (port 443) | ||
- | |||
- | * DNS 以外の全トラフィックをキャプチャ: | ||
- | |||
- | port not 53 | ||
- | |||
- | * 192.168.0.1 宛の SSH トラフィックをキャプチャ: | ||
- | |||
- | (port 22) and (dst host 192.168.0.1) | ||
==== レポート ==== | ==== レポート ==== | ||
行 540: | 行 493: | ||
==== Netflow リアルタイム表示 ==== | ==== Netflow リアルタイム表示 ==== | ||
- | This view is used to check captured data history | + | This view is used to check the history of captured data based on different search filters. |
この表示は、さまざまな検索フィルタに基づいて取得されたデータの履歴を調べるために使用します。フィルタを使用して、さまざまな異なる情報を表示することができます。データの視覚化をするには、表示された情報をグループ化する方法と、この情報を取得する方法があります。 | この表示は、さまざまな検索フィルタに基づいて取得されたデータの履歴を調べるために使用します。フィルタを使用して、さまざまな異なる情報を表示することができます。データの視覚化をするには、表示された情報をグループ化する方法と、この情報を取得する方法があります。 | ||
- | Filters can be seen in real time from **Monitoring** → **Network** → **Netflow | + | Filters can be viewed |
- | フィルタした情報は、**モニタリング(Monitoring)** → **ネットワーク(Network)** → **Netflow ライブビュー(Netflow Live View)** から表示できます。このツールで、フィルタの変更のプレビューおよび、好みの出力結果を保存できます。設定したフィルタをロードし編集することもできます。 | + | フィルタした情報は、**操作(Operation)** → **モニタリング(Monitoring)** → **ネットワーク(Network)** → **Netflow ライブビュー(Netflow Live View)** から表示できます。このツールで、フィルタの変更のプレビューおよび、好みの出力結果を保存できます。設定したフィルタをロードし編集することもできます。 |
- | {{ | + | The way to obtain the information can be: source IP address, destination IP address, source port or destination port. If you choose, for example, to display the destination IP address information, |
- | See [[: | + | 情報を取得する方法は、送信元 IP アドレス、宛先 IP アドレス、送信元ポート、または宛先ポートです。 たとえば、宛先 IP アドレス情報を表示することを選択した場合、情報は、宛先へのトラフィックが最も多い IP アドレスによって、最高から最低の順に並べ替えられて表示されます。 宛先ポートを選択して、プロトコルごとのネットワークの消費量を見る場合も同じことが行われます。 |
- | + | ||
- | ライブビューオプションの設定方法については、[[ja: | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | + | ||
- | 情報を取得する方法の場合、発信元IP、宛先IP、送信元ポート、宛先ポートから行います。たとえば、受信先 IP 情報を表示するように選択した場合、受信先へのトラフィックが最も多い IP から最も低い IP の順に表示されます。 宛先ポートを選択して、プロトコルごとにネットワークの利用量を見る場合も同じことが言えます。 | + | |
可能な表示方法は以下の通りです。 | 可能な表示方法は以下の通りです。 | ||
行 584: | 行 530: | ||
==== ネットワークトラフィックマップ ==== | ==== ネットワークトラフィックマップ ==== | ||
- | これは、OUM 733 から追加された機能で、この先も改善の予定です。ノード間のトラフィックに基づいて動的なネットワークマップを作成します。異なるアドレス間の関係(接続)および、(データ転送量による)トップ N を表示します。 | ||
- | {{ : | + | It allows you to create dynamic network maps, based on the traffic between nodes. It displays the relationship (connections) between different addresses, showing the N most important connections (by size of data transferred between them). |
+ | これにより、ノード間のトラフィックに基づいて動的なネットワーク マップを作成できます。 異なるアドレス間の関係 (接続) が表示され、最も重要な N 個の接続が (接続間で転送されるデータのサイズごとに) 表示されます。 | ||
+ | |||
+ | <wrap #ks2_10 /> | ||
==== 分散設定 ==== | ==== 分散設定 ==== | ||
+ | |||
+ | It is possible to locate the Pandora FMS node that collects NetFlow data in a host separate from the Console. In environments with a lot of NetFlow data, it is extremely recommended to locate it in a server with fast disks and a fast CPU with two cores or more. For Pandora FMS Console to be able to retrieve NetFlow data, it will be necessary to modify the default system configuration: | ||
+ | |||
コンソールから独立したホスト上に Netflow データを収集する pandora ノードを配置することも可能です。大量の Netflow データがある環境では、高速ディスクと 2コア以上の高速 CPU を備えたサーバに配置することをお勧めします。 Pandora コンソールがNetflow データを抽出するためには、以下の手順に従ってシステムのデフォルト設定を変更する必要があります。 | コンソールから独立したホスト上に Netflow データを収集する pandora ノードを配置することも可能です。大量の Netflow データがある環境では、高速ディスクと 2コア以上の高速 CPU を備えたサーバに配置することをお勧めします。 Pandora コンソールがNetflow データを抽出するためには、以下の手順に従ってシステムのデフォルト設定を変更する必要があります。 | ||
- | * **Web デーモンを実行するユーザと、コレクターノードで nfdump を実行するユーザとの間の自動 SSH 認証を構成します。** | + | |
+ | |||
+ | | ||
+ | |||
+ | The following steps must be followed for this configuration: | ||
その設定には、次の手順を実行する必要があります。 | その設定には、次の手順を実行する必要があります。 | ||
- | apache ユーザを有効化します。それには、/ | + | **Only for Pandora FMS environments on EL 8** |
- | apache: | + | **EL 8 上の Pandora FMS 環境のみ** |
- | /var/www ディレクトリ内に .ssh ディレクトリを作成し、正しいパーミッションを設定します。 | + | * First create the folder where the Apache SSH keys will be stored: |
- | < | + | * まず、Apache SSH 鍵を保存するフォルダーを作成します。 |
- | #mkdir /var/www/.ssh | + | |
- | #chown apache: | + | < |
+ | mkdir /usr/share/httpd/.ssh/ | ||
</ | </ | ||
- | ssh 鍵を作成し、それを Netflow トラフィックを収集するホストにコピーします。 | + | * Grant permissions to Apache on the created folder: |
- | < | + | * 作成したフォルダーに対して Apache に権限を付与します。 |
- | #su apache | + | |
- | bash-4.2$ssh-keygen | + | < |
- | Generating public/private rsa key pair. | + | chown -R apache. /usr/share/httpd/.ssh/ |
- | Enter file in which to save the key (/var/www/.ssh/id_rsa): | + | |
- | Enter passphrase (empty for no passphrase): | + | |
- | Enter same passphrase again: | + | |
- | Your identification has been saved in / | + | |
- | Your public key has been saved in / | + | |
- | The key fingerprint is: | + | |
- | SHA256: | + | |
- | The key's randomart image is: | + | |
- | +---[RSA 2048]----+ | + | |
- | |+oE | + | |
- | |.o . . .oo+o++ | | + | |
- | | . o . o o o+o| | + | |
- | | o . | + | |
- | | . S . . oo.| | + | |
- | | | + | |
- | | o . o+=| | + | |
- | | + + + +*| | + | |
- | | . o . o .| | + | |
- | +----[SHA256]-----+ | + | |
- | bash-4.2$ ssh-copy-id root@< | + | |
</ | </ | ||
- | コピーしたら、パスワード無しで apache ユーザがサーバにアクセスできるかどうかを確認します。 | + | * Login to BASH with Apache (the terminal user will change): |
- | | + | |
- | * **以下のように Pandora FMS コンソールで /usr/bin/nfdump を置き換えるスクリプトを作成します。** | + | <code bash> |
+ | su apache -s /bin/bash | ||
+ | </ | ||
- | < | + | |
- | # | + | |
- | NFDUMP_PARAMS=$(sed ' | + | |
- | ssh usuario@<netflow_server> "/ | + | * 次に、Apache ユーザーで SSH 鍵を生成します。 |
+ | |||
+ | <code bash> | ||
+ | ssh-keygen | ||
</ | </ | ||
- | スクリプトに実行パーミッションを与えます。 | + | * Copy the keys to the target machine, this step will request the credentials of the //user of the remote machine//: |
- | | + | |
+ | |||
+ | <code bash> | ||
+ | ssh-copy-id < User >@< IP_Address > | ||
+ | </ | ||
+ | |||
+ | * Finally check that you make a successful SSH connection to the target machine with the same user and without entering a password: | ||
+ | |||
+ | * 最後に、同じユーザでパスワードを入力せずにターゲットマシンへの SSH 接続が成功することを確認します。 | ||
+ | |||
+ | <code bash> | ||
+ | ssh < User >@< IP_Address > | ||
+ | </ | ||
- | 以下のようにスクリプトを実行してみます。 | + | From the Pandora FMS configuration, |
- | | + | Pandora FMS 設定の NetFlow セクションで、< |
- | つぎのような応答があります。 | + | {{ wiki: |
- | nfdump: Version: 1.6.13 | + | <wrap #ks3 /> |
===== sFlow でのネットワーク監視 ===== | ===== sFlow でのネットワーク監視 ===== | ||
行 727: | 行 678: | ||
[[ja: | [[ja: | ||
+ | |||
+ | ===== (OBSOLETE) ===== | ||
+ | |||
+ | === フィルタ作成 === | ||
+ | Netflow フィルターの基本的な編集画面: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | この機能における設定可能な NetFlow フィルタは次のとおりです。 | ||
+ | |||
+ | * **Name: | ||
+ | * **Group: | ||
+ | * **Filter: | ||
+ | * **Aggregate by:** All traffic data can be grouped by one of the following criteria: | ||
+ | * **DST IP address**: Group traffic of each IP from a different source. | ||
+ | * **DST port**: Group traffic of each IP with a different target. | ||
+ | * **SRC IP address**: Group traffic of each port from a different source. | ||
+ | * **SRC Port**: Group traffic of each port with a different target. | ||
+ | |||
+ | * **名前(Name)**: | ||
+ | * **グループ(Group)**: | ||
+ | * **フィルタ(Filter)**: | ||
+ | * **集約(Aggregate by)**: 通信が次の基準で集約されます: | ||
+ | * **宛先 IP(DST IP address)**: 異なる宛先 IP ごとに通信を表示します。 | ||
+ | * **宛先ポート(DST port)**: 異なる宛先ポートごとに通信を表示します。 | ||
+ | * **発信元 IP(SRC IP address)**: 異なる発信元 IP ごとに通信を表示します。 | ||
+ | * **発信元ポート(SRC Port)**: 異なる発信元ポートごとに通信を表示します。 | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | == 例 == | ||
+ | 基本ウェブ通信フィルタの例: | ||
+ | |||
+ | |||
+ | |||
+ | {{ wiki: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | 高度なイントラネット通信フィルタの例: | ||
+ | |||
+ | |||
+ | |||
+ | {{ wiki: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | 以下に、他のフィルタ例を示します。 | ||
+ | |||
+ | * 192.168.0.1 発または宛のトラフィックをキャプチャ: | ||
+ | |||
+ | host 192.168.0.1 | ||
+ | |||
+ | * 192.168.0.1 宛のトラフィックをキャプチャ: | ||
+ | |||
+ | dst host 192.168.0.1 | ||
+ | |||
+ | * 192.168.0.0./ | ||
+ | |||
+ | src net 192.168.0.0/ | ||
+ | |||
+ | * HTTP および HTTPS のトラフィックをキャプチャ: | ||
+ | |||
+ | (port 80) or (port 443) | ||
+ | |||
+ | * DNS 以外の全トラフィックをキャプチャ: | ||
+ | |||
+ | port not 53 | ||
+ | |||
+ | * 192.168.0.1 宛の SSH トラフィックをキャプチャ: | ||
+ | |||
+ | (port 22) and (dst host 192.168.0.1) | ||
+ |