両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
ja:documentation:pandorafms:monitoring:18_netflow [2024/09/16 05:44] – [分散設定] junichi | ja:documentation:pandorafms:monitoring:18_netflow [2025/07/27 06:42] (現在) – [Netflow プローブ] junichi |
---|
==== Netflow プローブ ==== | ==== Netflow プローブ ==== |
| |
The probes (for example in [[:en:documentation:pandorafms:monitoring:15_raspberry_monitoring|Raspberry]]) are generally routers with NetFlow enabled, configured, and sending information to the NetFlow collector (which in this case will be Pandora FMS server with the nfcapd daemon enabled). | The probes (for example in [[:en:documentation:pandorafms:technical_annexes:15_raspberry_monitoring|Raspberry]]) are generally routers with NetFlow enabled, configured, and sending information to the NetFlow collector (which in this case will be Pandora FMS server with the nfcapd daemon enabled). |
| |
プローブ ([[:ja:documentation:pandorafms:monitoring:15_raspberry_monitoring|Raspberry]] など) は通常、NetFlow が有効化され、設定され、情報を NetFlow コレクター (この場合は nfcapd デーモンが有効な Pandora FMS サーバです) に送信するルータです。 | プローブ ([[:ja:documentation:pandorafms:technical_annexes:15_raspberry_monitoring|Raspberry]] など) は通常、NetFlow が有効化され、設定され、情報を NetFlow コレクター (この場合は nfcapd デーモンが有効な Pandora FMS サーバです) に送信するルータです。 |
| |
==== インストールと必要要件 ==== | ==== インストールと必要要件 ==== |
== fprobe のインストール == | == fprobe のインストール == |
| |
**fprobe** captures traffic and sends it to a NetFlow Server. You 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® server. Through that you may generate NetFlow traffic from all network traffic going 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 generated, you 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|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 のインストール == |
==== 分散設定 ==== | ==== 分散設定 ==== |
| |
It is possible to locate the Pandora FMS node that collects NetFlow data in a host independent from the Console. In environments with a lot of NetFlow data, it is more than recommended to locate it in a server with fast disks and a fast CPU with two cores or more. For the Pandora FMS Console to be able to extract NetFlow data, it will be necessary to modify the default configuration of the system: | 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 データを抽出するためには、以下の手順に従ってシステムのデフォルト設定を変更する必要があります。 |
| |
{{ wiki:pfms-netflow-remote_settings.png }} | {{ wiki:pfms-netflow-remote_settings.png }} |
| |
| <wrap #ks3 /> |
| |
===== sFlow でのネットワーク監視 ===== | ===== sFlow でのネットワーク監視 ===== |