ja:documentation:pandorafms:monitoring:18_netflow

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:monitoring:18_netflow [2024/04/06 07:20] – [例] junichija:documentation:pandorafms:monitoring:18_netflow [2025/02/07 08:07] (現在) – [分散設定] junichi
行 165: 行 165:
 == fprobe のインストール == == fprobe のインストール ==
  
-**fprobe**  captures traffic and sends it to a NetFlow ServerYou may generate NetFlow traffic with it, among all the traffic that goes through its interfaces.+The **fprobe** software captures traffic and forwards it to a NetFlow® serverWith it you can generate NetFlow traffic from all network traffic passing through your interfaces.
  
 **fprobe** がトラフィックを取得し Netflow サーバへ送信します。インターフェイスを通過するすべてのトラフィックから、Netflow トラフィックを生成できます。 **fprobe** がトラフィックを取得し Netflow サーバへ送信します。インターフェイスを通過するすべてのトラフィックから、Netflow トラフィックを生成できます。
  
-To download the RPM package just run the following command, and then install it:+In Ubuntu 22 it is installed and configured with:
  
-RPM パッケージをダウンロードおインストールするには、以下のコマンドを用います。+Ubuntu 22 では、次のうにインストールおよび設定します。
  
-<code> +<code bash
-wget http://repo.iotti.biz/CentOS/7/x86_64/fprobe-1.1-2.el7.lux.x86_64.rpm +sudo apt install fprobe
-yum install fprobe-1.1-2.el7.lux.x86_64.rpm+
  
 </code> </code>
  
-For instance, executing this command, all ''eth0'' interface traffic will be sent to the NetFlow collector listening on port ''9995'' of the IP address ''192.168.70.185'':+The installation offers ''eth0'' as default interface, it must be configured with a valid network interface; in recent distros the Ethernet interface is named ''enp1s0'' and the wireless network interface ''wlp2s0'', **depending on the hardware these names may vary**.
  
-たとえばコマドを実行する、すべの ''eth0'' インターフェトラフィックが IP アドレス ''192.168.70.185'' のポート ''9995'' で待ち受けている Netflow コレクターに送信されます。+インストールではデフォルトターフェースて ''eth0'' が設定されますが、有効なネットワークインターフェで設定する必要があります。最近のデストリビューションでは、イーサネトインターフェーは ''enp1s0''、ワイヤレスネッワーク インターフェースは ''wlp2s0'' という名前になっていますが、**ハドウェアよってはこらの名前が異なる場合があります**
  
-<code> +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. ''192.168.70.185:9995''.
-/usr/sbin/fprobe -i eth0 192.168.70.185:9995+
  
-</code>+次に、データを収集するデバイス (この場合は **PFMS サーバ**) の IP アドレスと待ち受けポート (例: ''192.168.70.185:9995'') を確認します。
  
-Once the traffic has been generatedyou may see its statistics in the NetFlow collector by entering this command:+Once the installation has been completed, the operation can be tested:
  
-ラフィック生成されたら、次のコマンドでラフィックの状態を見る事ができます。+インスール完了したら、操作をテストできます。
  
-<code> +<code bash
-nfdump -R /var/spool/pandora/data_in/netflow+sudo systemctl status fprobe
  
 </code> </code>
  
-次のような情報が表示されます。+And it will return a response similar to this:
  
-<code> +そして、次のような応答が返されます。
-Aggregated flows 1286 +
-Top 10 flows ordered by packets: +
-Date flow start          Duration Proto      Src IP Addr:Port          Dst IP Addr:Port   Packets    Bytes Flows +
-2011-12-22 20:41:35.697   901.035 TCP     192.168.60.181:50935 ->     192.168.50.2:22        2105   167388     4 +
-2011-12-22 20:41:35.702   900.874 TCP       192.168.50.2:22    ->   192.168.60.181:50935     1275   202984     4 +
-2011-12-22 20:48:15.057     1.347 TCP       157.88.36.34:80    ->    192.168.50.15:40044      496   737160     1 +
-2011-12-22 20:48:14.742     1.790 TCP     91.121.124.139:80    ->    192.168.50.15:60101      409   607356     1 +
-2011-12-22 20:46:02.791    76.616 TCP      192.168.50.15:80    ->   192.168.60.181:40500      370   477945     1 +
-2011-12-22 20:48:15.015     1.389 TCP      192.168.50.15:40044 ->     157.88.36.34:80         363    22496     1 +
-2011-12-22 20:46:02.791    76.616 TCP     192.168.60.181:40500 ->    192.168.50.15:80         303    24309     1 +
-2011-12-22 20:48:14.689     1.843 TCP      192.168.50.15:60101 ->   91.121.124.139:80         255    13083     1 +
-2011-12-22 20:48:14.665     1.249 TCP     178.32.239.141:80    ->    192.168.50.15:38476      227   335812     1 +
-2011-12-22 20:48:21.350     0.713 TCP     137.205.124.72:80    ->    192.168.50.15:47551      224   330191     1+
  
-Top 10 flows ordered by bytes: +{{  wiki:sudo_systemctl_status_fprobe.png  }} 
-Date flow start          Duration Proto      Src IP Addr:Port          Dst IP Addr:Port   Packets    Bytes Flows + 
-2011-12-22 20:48:15.057     1.347 TCP       157.88.36.34:80    ->    192.168.50.15:40044      496   737160     1 +To enable it at every system startup
-2011-12-22 20:48:14.742     1.790 TCP     91.121.124.139:80    ->    192.168.50.15:60101      409   607356     1 + 
-2011-12-22 20:46:02.791    76.616 TCP      192.168.50.15:80    ->   192.168.60.181:40500      370   477945     1 +システムの起動ごとに有効にするには
-2011-12-22 20:48:14.665     1.249 TCP     178.32.239.141:80    ->    192.168.50.15:38476      227   335812     1 + 
-2011-12-22 20:48:21.350     0.713 TCP     137.205.124.72:80    ->    192.168.50.15:47551      224   330191     1 +<code bash
-2011-12-22 20:48:15.313     1.603 TCP       89.102.0.150:80    ->    192.168.50.15:52019      212   313432     1 +sudo systemctl enable fprobe
-2011-12-22 20:48:14.996     1.433 TCP     212.219.56.138:80    -   192.168.50.15:36940      191   281104     1 +
-2011-12-22 20:51:12.325    46.928 TCP      192.168.50.15:80    ->   192.168.60.181:40512      201   245118     1 +
-2011-12-22 20:52:05.935    34.781 TCP      192.168.50.15:80    ->   192.168.60.181:40524      167   211608     1 +
-2011-12-22 20:41:35.702   900.874 TCP       192.168.50.2:22    ->   192.168.60.181:50935     1275   202984     4+
  
-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/second: 208345.2   Wall: 0.006s flows/second: 221177.2 
 </code> </code>
  
 +To read the complete **fprobe** help:
  
-ここまでの動作確認できたら、次はそれ用できるようにするための Pandora FMS の設定です。+完全な **fprobe** ヘルプを読むには: 
 + 
 +https://manpages.ubuntu.com/manpages/jammy/man8/fprobe.8.html 
 + 
 +Once traffic has been generated, you can view traffic statistics in the NetFlow collector of the **PFMS server** with the command: 
 + 
 +トラフィック生成されると、次のコマンド使して、**PFMS サーバ** の NetFlow コレクターでトラフィック統計を表示できす。 
 + 
 +<code> 
 +nfdump -R /var/spool/pandora/data_in/netflow 
 + 
 +</code>
  
 == pmacct のインストール == == pmacct のインストール ==
行 412: 行 401:
  
 ここで、''x_dias'' は、デバイスに残す NetFlow データの最大日数です(//Pandora FMS コンソールの設定とは関係ありません//)。 ここで、''x_dias'' は、デバイスに残す NetFlow データの最大日数です(//Pandora FMS コンソールの設定とは関係ありません//)。
 +
 +<wrap #ks2_6 />
  
 ==== フィルタ ==== ==== フィルタ ====
行 427: 行 418:
 <WRAP center round info 60%> <WRAP center round info 60%>
  
-{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise version}}Version 770 or later.+Version 770 or later.
  
 </WRAP> </WRAP>
行 433: 行 424:
 <WRAP center round info 60%> <WRAP center round info 60%>
  
-{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise 版}}バージョン 770 以降+バージョン 770 以降
  
 </WRAP> </WRAP>
行 502: 行 493:
 ==== Netflow リアルタイム表示 ==== ==== Netflow リアルタイム表示 ====
  
-This view is used to check captured data history based on different search filters. You may use filters and different ways of information display. It is necessary to define the way to group the displayed information, as well as the way to obtain this information in order to start seeing data.+This view is used to check the history of captured data based on different search filters. Filters and different forms of information display can be usedThe way of grouping the displayed information must be defined, as well as the way of obtaining such information in order to start displaying data.
  
 この表示は、さまざまな検索フィルタに基づいて取得されたデータの履歴を調べるために使用します。フィルタを使用して、さまざまな異なる情報を表示することができます。データの視覚化をするには、表示された情報をグループ化する方法と、この情報を取得する方法があります。 この表示は、さまざまな検索フィルタに基づいて取得されたデータの履歴を調べるために使用します。フィルタを使用して、さまざまな異なる情報を表示することができます。データの視覚化をするには、表示された情報をグループ化する方法と、この情報を取得する方法があります。
  
-Filters can be seen in real time from **Monitoring** → **Network** → **Netflow Live View**. This tool allows you to see the changes that are made to a filter and save it once the desired result is obtained. It is also possible to load and modify existing filters.+Filters can be viewed in real time from **Operation**  → **Monitoring**  → **Network**  → **NetFlow Live View**. This tool allows you to visualize the changes made to a filter and save it once the desired result is obtained. It is also possible to load and modify existing filters.
  
-フィルタした情報は、**モニタリング(Monitoring)** → **ネットワーク(Network)** → **Netflow ライブビュー(Netflow Live View)** から表示できます。このツールで、フィルタの変更のプレビューおよび、好みの出力結果を保存できます。設定したフィルタをロードし編集することもできます。+フィルタした情報は、**操作(Operation)** → **モニタリング(Monitoring)** → **ネットワーク(Network)** → **Netflow ライブビュー(Netflow Live View)** から表示できます。このツールで、フィルタの変更のプレビューおよび、好みの出力結果を保存できます。設定したフィルタをロードし編集することもできます。
  
-{{  :wiki:pfms-monitoring-network-netflow_live_view.png  }}+The way to obtain the information can besource IP address, destination IP address, source port or destination port. If you choose, for example, to display the destination IP address information, the information will be displayed sorted by the IP addresses with the most traffic to the destination from highest to lowest. The same would be done to know the consumption of your network by protocol, choosing by destination port.
  
-See [[:en:documentation:03_monitoring:18_netflow#reports|Reports]] and [[:en:documentation:03_monitoring:18_netflow#filters|Filters]] to learn how to configure live view options. +情報を取得する方法信元 IP アドレス、宛先 IP アドレス、送信元ポート、または宛先ポートす。 たとえば、先 IP アドレス情報を表示することを選択した場合、情報は、宛先へのトラフィックが最も多い IP アドレスによって、最高から最低の順に並べ替えられて表示されます。 宛先ポートを選択して、プロトコルごとネットワークの消費量を見る場合も同じことが行われます。
- +
-ライブビューオプションの設定方法については、[[ja:documentation:03_monitoring:18_netflow#レポート|レポート]] と [[ja:documentation:03_monitoring:18_netflow#フィルタ|フィルタ]] を参照してください。 +
- +
-{{  :wiki:netflow_view1.png  }} +
- +
- +
-情報を取得する方法の場合信元IP、宛先IP、送信元ポート、宛先ポートから行います。たとえば、受信先 IP 情報を表示するように選択した場合、受信先へのトラフィックが最も多い IP から最い IP の順に表示されます。 宛先ポートを選択して、プロトコルごとネットワークの利用量を見る場合も同じことが言えます。+
  
 可能な表示方法は以下の通りです。 可能な表示方法は以下の通りです。
行 546: 行 530:
  
 ==== ネットワークトラフィックマップ ==== ==== ネットワークトラフィックマップ ====
-これは、OUM 733 から追加された機能で、この先も改善の予定です。ノード間のトラフィックに基づいて動的なネットワークマップを作成します。異なるアドレス間の関係(接続)および、(データ転送量による)トップ N を表示します。 
  
-{{  :wiki:network_usage_map.jpg?700  |network_usage_map.jpg}}+It allows you to create dynamic network maps, based on the traffic between nodesIt 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 認証を構成します。**+  * Configure automatic SSH authentication between the user who owns the web daemon and the user who is able to execute **nfdump** on the collector node. 
 + 
 +  * Web デーモンを実行するユーザと、コレクターノードで **nfdump** を実行するユーザとの間の自動 SSH 認証を構成します。 
 + 
 +The following steps must be followed for this configuration:
  
 その設定には、次の手順を実行する必要があります。 その設定には、次の手順を実行する必要があります。
  
-apache ユーザを有効化します。それには、/etc/passwd ファイル内の apache ユーザを次のように編集します。+**Only for Pandora FMS environments on EL 8**
  
-  apache:x:48:48:Apache:/var/www:/bin/bash+**EL 8 上の Pandora FMS 環境のみ**
  
-/var/www ディレクトリ内に .ssh ディレクトリを作成し、正しいパーミッションを設定します。+  * First create the folder where the Apache SSH keys will be stored:
  
-<code> +  * まず、Apache SSH 鍵を保存するフォルダーを作成します。 
-#mkdir /var/www/.ssh + 
-#chown apache:apache /var/www/.ssh+<code bash
 +mkdir /usr/share/httpd/.ssh/
 </code> </code>
  
-ssh 鍵を作成し、それを Netflow トラフィックを収集するホストにコピーします。+  * Grant permissions to Apache on the created folder:
  
-<code> +  * 作成したフォルダーに対して Apache に権限を付与します。 
-#su apache + 
-bash-4.2$ssh-keygen +<code bash
-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 /var/www/.ssh/id_rsa. +
-Your public key has been saved in /var/www/.ssh/id_rsa.pub. +
-The key fingerprint is: +
-SHA256:vYvl5V00E4faa14zN08ARzGUQ9IfAQJnMzkaqLAGRHI apache@<server> +
-The key's randomart image is: +
-+---[RSA 2048]----+ +
-|+oE     ...*o=B+.| +
-|.o .   . .oo+o++ | +
-|  . o .   o o o+o| +
-|   o .      +| +
-|  .     S . . oo.| +
-|             +o| +
-|          o . o+=| +
-|         + + + +*| +
-|        . o . o .| +
-+----[SHA256]-----+ +
-bash-4.2$ ssh-copy-id root@<netflow_server>+
 </code> </code>
  
-コピーしたら、パスワード無しで apache ユーザがサーバにアクセスできるかどうかを確認します。+  * Login to BASH with Apache (the terminal user will change):
  
-  bash-4.2$ ssh usuario@<netflow_server>+  * Apache で BASH ログインします (ターミナルユーザが変わります)。
  
-  * **以下のように Pandora FMS コンソールで /usr/bin/nfdump を置き換えるスクリプトを作成します。**+<code bash> 
 +su apache -s /bin/bash 
 +</code>
  
-<code> +  Now generate SSH keys with Apache user:
-#!/bin/bash +
-NFDUMP_PARAMS=$(sed 's/(\(.*\))/\"\(\1\)\"/' <<< "$@");+
  
-ssh usuario@<netflow_server"/usr/bin/nfdump $NFDUMP_PARAMS"+  * 次に、Apache ユーザーで SSH 鍵を生成します。 
 + 
 +<code bash> 
 +ssh-keygen
 </code> </code>
  
-スクリプトに実行パーミッションを与えます。+  * Copy the keys to the target machine, this step will request the credentials of the //user of the remote machine//:
  
-  chmod 755 /usr/bin/nfdump+  * 鍵をターゲットマシンにコピーします。この手順では、//リモートマシンのユーザ//の資格情報が要求されます。 
 + 
 +<code bash> 
 +ssh-copy-id < User >@< IP_Address > 
 +</code> 
 + 
 +  * 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 > 
 +</code>
  
-以下のようにスクリプトを実行してみます。+From the Pandora FMS configuration, in the NetFlow section, you can fill in the <wrap :en>**Remote Settings**</wrap> section with the previous data, to access the NetFlow remote data:
  
-  /usr/bin/nfdump -V+Pandora FMS 設定の NetFlow セクションで、<wrap :ja>**リモート設定(Remote Settings)**</wrap> セクションに前のデータを入力して、NetFlow リモートデータにアクセスできます。
  
-つぎのような応答があります。+{{ wiki:pfms-netflow-remote_settings.png  }}
  
-  nfdump: Version: 1.6.13+<wrap #ks3 />
  
 ===== sFlow でのネットワーク監視 ===== ===== sFlow でのネットワーク監視 =====
行 718: 行 707:
  
 {{  :wiki:pfms-resources-netflow_filters-edit_filter-aggregate_by.png  }} {{  :wiki:pfms-resources-netflow_filters-edit_filter-aggregate_by.png  }}
 +
 +== 例 ==
 +基本ウェブ通信フィルタの例:
 +
 +
 +
 +{{ wiki:Netflow5.png }}
 +
 +
 +
 +
 +高度なイントラネット通信フィルタの例:
 +
 +
 +
 +{{ wiki:Netflow6.png }}
 +
 +
 +
 +
 +以下に、他のフィルタ例を示します。
 +
 +  * 192.168.0.1 発または宛のトラフィックをキャプチャ:
 +
 +  host 192.168.0.1
 +
 +  * 192.168.0.1 宛のトラフィックをキャプチャ:
 +
 +  dst host 192.168.0.1
 +
 +  * 192.168.0.0./24 発のトラフィックをキャプチャ:
 +
 +  src net 192.168.0.0/24
 +
 +  * 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)
  
  • ja/documentation/pandorafms/monitoring/18_netflow.1712388019.txt.gz
  • 最終更新: 2024/04/06 07:20
  • by junichi