ja:documentation:pandorafms:monitoring:18_netflow

文書の過去の版を表示しています。


Netflow および sFlow によるネットワーク監視

Pandora FMS uses a tool to analyze the network in real time: NetFlow® and sFlow®. It uses the principle of “listening” through Ethernet continuously and analyzing traffic to generate statistics.

Pandora FMSは、NetFlow® と sFlow® というツールを使ってネットワークをリアルタイムで分析します。イーサネットを介して継続的に「リスニング」を行い、トラフィックを分析して統計情報を生成するという原理に基づいています。

To intercept network traffic and be able to analyze it, physical access to that network is needed, since the network capture point must be the most appropriate. To capture such data, traffic must be redirected from one switch port to another port using a “port-mirror”. Not all network devices allow this (only mid/high-range ones). A port-mirror can also be done on some commercial firewall devices. It is the easiest way to intercept traffic and requires no additional hardware. By sending all traffic to one port, that port connects directly to the network analyzer (probe).

ネットワークトラフィックを傍受して分析するには、ネットワークキャプチャポイントが最も適切な場所である必要があるため、そのネットワークへの物理的なアクセスが必要です。このようなデータをキャプチャするには、「ポートミラー」を使用して、トラフィックをあるスイッチポートから別のポートにリダイレクトする必要があります。すべてのネットワークデバイスがこれに対応しているわけではありません(中級/高級デバイスのみ)。ポートミラーは、一部の商用ファイアウォールデバイスでも実行できます。これはトラフィックを傍受する最も簡単な方法であり、追加のハードウェアは必要ありません。すべてのトラフィックを1つのポートに送信することで、そのポートはネットワークアナライザ(プローブ)に直接接続されます。

These high-range switches and/or firewalls allow monitoring to be performed more easily. This is because these devices send network flow statistical information directly to the Pandora FMS collector without the need for an independent probe. Hardware specifications should be consulted to see if NetFlow and/or sFlow can be enabled and flows sent to an independent collector (in this case, the Pandora FMS collector).

これらの高性能スイッチやファイアウォールを使用することで、監視をより容易に行うことができます。これは、これらのデバイスが独立したプローブを必要とせずに、ネットワークフローの統計情報を Pandora FMS コレクターに直接送信するためです。NetFlow や sFlow を有効にして、フローを独立したコレクター(この場合は Pandora FMS コレクター)に送信できるかどうかは、ハードウェア仕様書を参照してください。

Pandora FMS is capable of monitoring IP traffic using the NetFlow protocol.

Pandora FMS は、NetFlow プロトコルを使用して IP トラフィックを監視できます。

NetFlow® is a network protocol, developed by Cisco Systems® and is currently supported on several platforms in addition to Cisco IOS® and NXOS®, such as devices from manufacturers like Juniper®, Enterasys Switches®, and operating systems like Linux®, FreeBSD®, NetBSD® and OpenBSD®.

NetFlow® は Cisco Systems® によって開発されたネットワーク プロトコルで、現在 Cisco IOS® および NXOS® に加えて、Juniper®、Enterasys Switches® などのメーカーのデバイスや Linux®、FreeBSD®、NetBSD®、OpenBSD® などのオペレーティングシステムなど、いくつかのプラットフォームでサポートされています。

NetFlow-enabled devices, when this feature is activated, generate “NetFlow records” consisting of small fragments of information that they send to a central device (a NetFlow server or collector), which receives information from the devices (NetFlow probes) to store and process it.

NetFlow 対応デバイスは、この機能が有効になると、小さな情報断片からなる「NetFlow レコード」を生成し、中央デバイス(NetFlow サーバまたはコレクター)に送信します。中央デバイスは、デバイス(NetFlow プローブ)から情報を受け取り、それを保存および処理します。

This information is transmitted using the NetFlow protocol, based on UDP or SCTP. Each NetFlow record is a small packet containing a minimum amount of information, but in no case does it contain raw traffic data. That is, it does not send the payload of the traffic flowing through the collector, only the statistical data.

この情報は、UDP または SCTP に基づく NetFlow プロトコルを使用して送信されます。各 NetFlow レコードは、最小限の情報を含む小さなパケットですが、生のトラフィックデータは一切含まれません。つまり、コレクターを通過するトラフィックのペイロードは送信されず、統計データのみが送信されます。

The traditional Cisco definition is to use a 7-element key:

Cisco の従来の定義では、7要素のキーを使用します。

  • Source IP address.
  • Destination IP address.
  • Source UDP or TCP port.
  • Destination UDP or TCP port.
  • IP protocol.
  • Interface (SNMP ifIndex).
  • IP Type of Service.
  • 発信元 IP アドレス
  • 宛先 IP アドレス
  • 発信元 UDP または TCP ポート
  • 宛先 UDP または TCP ポート
  • IP プロトコル
  • インタフェース (SNMP ifIndex)
  • サービスのタイプ

Over time, other manufacturers have designed equivalent systems for their network devices, with different names but similar purposes:

時が経つにつれ、他のメーカーもネットワーク機器向けに同様のシステムを設計するようになり、名称は異なるものの、目的はほぼ同じです。

  • Jflow or cflowd by Juniper Networks®.
  • NetStream by 3Com/H3C|HP®.
  • NetStream by Huawei®.
  • Cflowd by Alcatel Lucent®.
  • Rflow by Ericsson®.
  • AppFlow®.
  • Juniper Networks® の Jflow または cflowd
  • 3Com/H3C|HP® の NetStream
  • Huawei® の NetStream
  • Alcatel Lucent® の Cflowd
  • Ericsson® の Rflow
  • AppFlow®

This is a device (PC or server) located on the network to collect all the NetFlow information sent from routers and switches.

Netflow コレクタは、ルータやスイッチから送られた全ての Netflow 情報を収集するためにネットワーク上に置かれたデバイス(PCやサーバ)です。

NetFlow generates and collects this information, but software is needed to store and analyze said traffic. With Pandora FMS, a special server is used for this purpose, which Pandora FMS will start and stop when the PFMS Server is started. This server is called nfcapd and it must be installed to use NetFlow monitoring.

Netflow サーバは、データを受け取り保存するために必要です。Pandora FMS は、この目的に nfcapd を利用しています。Pandora FMS が Netflow データを処理できるようにするには、これをインストールする必要があります。Pandora FMS は、必要なときに自動的にこのサーバを起動・停止します。

Probes (such as Raspberry Pi) are generally routers with NetFlow enabled, configured, and sending information to the NetFlow collector (which in this case will be the Pandora FMS server with the nfcapd daemon enabled).

プローブ (Raspberry Pi など) は通常、NetFlow が有効化され、設定され、情報を NetFlow コレクター (この場合は nfcapd デーモンが有効な Pandora FMS サーバです) に送信するルータです。

Pandora FMS uses an OpenSource tool called nfcapd (belonging to the nfdump package) 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 operating system before working with NetFlow in Pandora FMS.

Pandora FMS は、全ての netflow 通信を処理するためにオープンソースのツールである nfcapd (nfdump パッケージに含まれています) を利用します。このデーモンは、Pandora FMS サーバにより自動的に起動されます。このシステムは、データを特定の場所のバイナリファイルに保存します。Netflow を使うには、nfcapd をインストールする必要があります。

The nfcapd daemon defaults to listening on port 9995/UDP, so it must be taken into account if firewalls are enabled to open this port number and when configuring NetFlow probes.

nfcapd デーモンのデフォルトの待ち受けポートは 9995/UDP です。ファイアーウォールがある場合は、このポートを開ける必要があることに注意してください。

nfcapd のインストール

The installation of nfcapd must be done manually, as Pandora FMS will not install it. For more information, go to the official nfcapd project page.

nfcapd は、手動でインストールする必要があります。Pandora FMS 自身は nfcapd をインストールしません。インストール方法の詳細は、nfcapd プロジェクトの公式ページを参照してください。

Pandora FMS by default uses the /var/spool/pandora/data_in/netflow directory to process information, so when nfcapd starts, it will use this directory. Avoid modifying this location path, unless strictly necessary and with full knowledge of it.

Pandora FMS はデフォルトで、Netflow データを保存するのに “/var/spool/pandora/data_in/netflow” ディレクトリを利用します。Pandora FMS サーバによって起動されるときに、nfcapd にこのディレクトリが指定されます。何を行っているかがわからない場合は、変更しないでください。

It is necessary to install nfdump version 1.6.8p1 to use it with Pandora FMS.

Pandora FMS では、Netflow データを処理するのに nfdump バージョン 1.6.8p1 が必要です。

If you want to check that nfcapd is correctly installed, run the following command to start the process in the foreground:

nfcapd が正しくインストールできたか確認するには、以下のようにコマンドを実行してプロセスを起動します。

nfcapd -l /var/spool/pandora/data_in/netflow

If everything goes well, you should get an output similar to this:

すべて正しく動作していれば、以下のような出力が見られます。

 Add extension: 2 byte input/output interface index
 Add extension: 4 byte input/output interface index
 Add extension: 2 byte src/dst AS number
 Add extension: 4 byte src/dst AS number
 Add extension: 4 byte output bytes
 Add extension: 8 byte output bytes
 Add extension: NSEL Common block
 Add extension: NSEL xlate ports
 Add extension: NSEL xlate IPv4 addr
 Add extension: NSEL xlate IPv6 addr
 Add extension: NSEL ACL ingress/egress acl ID
 Add extension: NSEL username
 Add extension: NSEL max username
 Add extension: NEL Common block
 Bound to IPv4 host/IP: any, Port: 9995
 Startup.
 Init IPFIX: Max number of IPFIX tags: 62

Keep in mind that it is necessary for Pandora FMS, and specifically the WEB server that runs the Web Console, to have access to those data files located by default at:

/var/spool/pandora/data_in/netflow

Pandora FMS コンソール(具体的には、それを実行する Web サーバ)がデータにアクセスできる必要があることに注意してください。 この例では次の場所です。

/var/spool/pandora/data_in/netflow

プローブのインストール

If a router with NetFlow is not available, but its traffic passes through a Linux system, software can be installed that acts as a probe and sends NetFlow traffic information to the collector.

NetFlow に対応したルーターが利用できない場合でも、そのトラフィックが Linux システムを経由する場合は、プローブとして機能し、NetFlow トラフィック情報をコレクターに送信するソフトウェアをインストールできます。

fprobe のインストール

The fprobe software captures traffic and forwards it to a NetFlow® server. With it, you can generate NetFlow traffic from all the network traffic passing through its interfaces.

fprobe がトラフィックを取得し NetFlow® サーバへ送信します。インターフェイスを通過するすべてのトラフィックから、Netflow トラフィックを生成できます。

In Ubuntu 22 it is installed and configured with:

Ubuntu 22 では、次のようにインストールおよび設定します。

sudo apt install fprobe

The installation offers eth0 as the 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, these names may vary depending on the hardware.

インストールでは、デフォルトのインターフェースとして eth0 が設定されますが、有効なネットワークインターフェースで設定する必要があります。最近のディストリビューションでは、イーサネットインターフェースは enp1s0、ワイヤレスネットワーク インターフェースは wlp2s0 という名前になっていますが、ハードウェアによってはこれらの名前が異なる場合があります

Next, it will ask for the IP address and the listening port number of the device that will collect the data (in this case the PFMS server), in a format similar to 192.168.70.185:9995.

次に、データを収集するデバイス (この場合は PFMS サーバ) の IP アドレスと待ち受けポート (例: 192.168.70.185:9995) を確認します。

Once the installation is finished, operation can be checked:

インストールが完了したら、操作をテストできます。

sudo systemctl status fprobe

And it will return a response similar to this:

そして、次のような応答が返されます。

To enable it on every system startup:

システムの起動ごとに有効にするには:

sudo systemctl enable fprobe

To read the complete fprobe help:

完全な fprobe ヘルプを読むには:

https://manpages.ubuntu.com/manpages/resolute/man8/fprobe.8.html

Once traffic has been generated, its statistics can be seen in the PFMS Server NetFlow collector with the command:

トラフィックが生成されると、次のコマンドを使用して、PFMS サーバ の NetFlow コレクターでトラフィック統計を表示できます。

nfdump -R /var/spool/pandora/data_in/netflow

pmacct のインストール

Experimental.

実験的

Among many features of the pmacct probe are the ability to work with NetFlow v1/v5/v7/v8/v9 and sFlow v2/v4/v5 over IPv4 and IPv6.

pmacct プローブは、IPv4 および IPv6 を介して NetFlow v1/v5/v7/v8/v9、sFlow v2/v4/v5 で動作する機能があります。

The source code is hosted at:

ソースコードは以下にあります。

Install dependencies with administrator rights:

依存ファイルの管理者権限でのインストール。

Rocky Linux 8

dnf config-manager --set-enabled powertools
dnf groupinstall 'Development Tools'
dnf install libpcap libpcap-devel

Rocky Linux 9

dnf config-manager --set-enabled crb
dnf groupinstall 'Development Tools'
dnf install libpcap libpcap-devel

Download the pmacct source code (you can use curl instead of wget) and compile:

pmacct のソースをダウンロード(wget の代わりに curl も使えます)してビルドします。

cd /tmp
wget -O pmacct-1.7.7.tar.gz \ 
  "https://github.com/pmacct/pmacct/releases/download/v1.7.7/pmacct-1.7.7.tar.gz"
tar xvzf pmacct-1.7.7.tar.gz
cd pmacct-1.7.7
./autogen.sh
./configure
make && make install

Start pmacct as a NetFlow probe in daemon mode:

デーモンモードで、pmacct を NetFlow プローブとして起動します。

  • Create a configuration for pmacct.
  • pmacct 設定の作成:

In this particular case, all traffic from the eth0 interface will be sent to the NetFlow collector listening on port number 9995 of the IP address 192.168.70.185:

例では、すべての eth0 インターフェイストラフィックが、IP アドレス 192.168.70.185 のポート 9995 で待ち受けている NetFlow コレクタに送信されます。

cat> ~/pmacctd_probe.conf <<EOF
daemonize: true
pcap_interface: eth0
aggregate: src_host, dst_host, src_port, dst_port, proto, tos
plugins: nfprobe
nfprobe_receiver: 192.168.70.185:9995
nfprobe_version: 9
EOF
  • Start pmacctd:
  • pmacctd の起動:
/usr/local/sbin/pmacctd -f ~/pmacctd_probe.conf

Pandora FMS works with NetFlow as an auxiliary system, that is, it does not store NetFlow information in the database. Pandora FMS displays this information as reports requested on demand.

Pandora FMS は、補助システムとしての Netflow と連動します。つまり、データベースに NetFlow データを保存しません。 Pandora FMS は、その情報をオンデマンドでレポートとして表示します。

Pandora FMS operates with NetFlow using sets of rules to visualize specific traffic. These rules can be something as simple as “All traffic from the network 192.168.70.0/24” or something more complex using pcap expressions.

Pandora FMS は、フィルタを使って Netflow データを処理します。フィルタは、通信パターンにマッチするルールのセットです。ルールは、'all the traffic from 192.168.70.0/24 network'(サブネット 192.168.70.0/24 からの通信すべて) といったように簡単です。また、pcap のフィルタ書式も利用できます。

Once filters are defined, reports are defined that determine how to visualize the data (charts, lists, …) and the time interval. By defining filters and reports, that information remains defined, similar to how it works with Pandora FMS reports, to be used on demand when needed. NetFlow reports will also appear as a “report type” in the Pandora FMS Custom Reports section, so they can be incorporated into normal Pandora FMS reports.

フィルタが定義されると、データの視覚化方法(グラフ、リストなど)と時間間隔を決定するレポートが定義されます。フィルタとレポートを定義することで、その情報は Pandora FMS レポートと同様に定義されたままになり、必要に応じてオンデマンドで使用できます。NetFlow レポートは、Pandora FMS カスタムレポートセクションに「レポートタイプ」として表示されるため、通常の Pandora FMS レポートに組み込むことができます。

On the other hand, there is a “real-time” view console to analyze traffic, composing the rules directly. It is useful for investigating problems, seeing specific charts that do not correspond to a certain filter, etc.

一方、トラフィックを分析し、ルールを直接作成できる「リアルタイム」表示コンソールも用意されています。これは、問題の調査や、特定のフィルタに該当しない特定のグラフの確認などに役立ちます。

設定

The access speed of the storage device where the NetFlow data resides is normally the limiting performance factor.

Netflow データが保存されるハードディスクアクセス速度は、通常、パフォーマンスに関わる重要な要素です。

First, NetFlow must be enabled so that it is accessible from the Operation and Administration menus. In the Configuration section, there is an option to enable or disable NetFlow globally:

まず、NetFlow を有効にして、操作メニューと管理メニューからアクセスできるようにする必要があります。設定画面には、NetFlow をグローバルに有効または無効にするオプションがあります。

Once activated, a new NetFlow configuration option will appear in the configuration section:

有効化すると、新たに Netflow 設定オプションが表示されます。

This section must be configured correctly so that the nfcapd daemon can start without problems along with the Pandora FMS Server:

ここでは、nfcapd デーモンが Pandora FMS サーバと同時に起動するように正しく設定する必要があります。

  • Data storage path: Directory where NetFlow data files will be stored. Only the directory name should be placed, by default netflow (see General Setup).
  • Daemon binary path: Path to the nfcapd binary.
  • Nfdump binary path: Path to the nfdump binary.
  • Nfexpire binary path: Path to the nfexpire binary.
  • Maximum chart resolution: Maximum number of points that a NetFlow area chart will display. The higher the resolution, the worse the performance. Values between 50 and 100 are recommended.
  • Disable custom live view filters: Disables the definition of custom filters from the NetFlow view (already created filters can still be used).
  • Max. NetFlow lifespan: Indicates the maximum time in days of NetFlow data that will be stored.
  • Enable IP address name resolution: Allows IP address resolution to try to obtain the hostnames of NetFlow devices.
  • NetFlow interval: Allows adjusting 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 データが保存されるディレクトリです。ディレクトリ名のみを入力します。デフォルトは netflow です(一般設定を参照)
  • デーモンバイナリパス(Daemon binary path): nfcapd バイナリのパスです。
  • Nfdump バイナリパス(Nfdump binary path): nfdump バイナリのパスです。
  • Nfexpire バイナリパス(Nfexpire binary path): nfexpire バイナリのパスです。
  • 最大グラフ解像度(Maximum chart resolution): Netflow グラフを表示するエリアの最大サイズです。解像度を高くするとパフォーマンスが下がります。50 と 100 の間の値をお勧めします。
  • ライブビューカスタムフィルタの無効化(Disable custom live view filters): 有効にすると、管理者によってあらかじめ作成された Netflow フィルタのみが Netflow ライブビューで利用できます。
  • Netflow 最大保存期間(Netflow max lifespan): 指定した日数よりも古い Netflow データが削除されます。
  • IP アドレス名前解決の有効化(Enable IP address name resolution): Netflow デバイスから IP アドレスの名前解決をするようにします。
  • デーモン間隔(Daemon interval): (バージョン NG 769 およびそれ以前) データファイルをローテートする時間間隔(秒)です。3600を推奨します。間隔を大きくすると大きなファイルとなり、I/O のオーバーヘッドは小さくなりますが、特定の時間間隔におけるデータの検索は遅くなります。

Once NetFlow is configured in the console, the PFMS Server will need to be restarted so that it starts the nfcapd server. This must be correctly installed before attempting to start it. Check the server logs in case of any doubt.

コンソールで NetFlow を設定したら、Pandora FMS サーバを再起動して、nfcapd サーバを起動します。 このサーバは、実行する前に適切にインストールする必要があります。 疑わしい場合はサーバのログを確認してください。

If you decide to store NetFlow data on a device other than the PFMS Server (see nfcapd installation procedure and the distributed configuration), the binary file /usr/bin/nfexpire must be copied to that device and the following entry added to the /etc/crontab file:

NetFlow データを PFMS サーバ以外のデバイス ((nfcapd のインストール手順 および 分散設定 を参照) に保存する場合は、バイナリファイル /usr/bin/nfexpire をそのデバイスに追加し、次のエントリを /etc/crontab に追加します。

0 * * * * root yes 2>/dev/null | /usr/bin/nfexpire -e "/var/spool/pandora/data_in/netflow" -t X_days d

Where x_days is the maximum number of days of antiquity, of the NetFlow data, to be retained on said device (in this particular case the PFMS Web Console configuration, for that field, will not take effect).

ここで、x_dias は、デバイスに残す NetFlow データの最大日数です(Pandora FMS コンソールの設定とは関係ありません)。

The menu for creating and editing filters is found in Management → Resources → Netflow filters. In that view, there is a list of already created filters that can be modified and/or deleted.

リソース(Resources) > NetFlow フィルタ(NetFlow Filters) をクリックすることにより、作成および編集ができます。このセクションには、変更または削除できる作成済みのフィルタのリストが含まれています。

A filter can also be created directly from the Netflow live view, saving the active filter as a new one. NetFlow filters can be basic or advanced: The difference is that the former have fixed filtering fields (source IP address, destination IP address, source port number, destination port number) and the advanced ones are defined using a pcap expression (standard in filtering expressions for network traffic) and use tools of all kinds.

NetFlow ライブビューからすぐにフィルタを作成し、アクティブなフィルタを新しいフィルタとして保存することもできます。 NetFlow フィルタには “基本(basic)” または “高度(advanced)” があります。 違いは、前者には固定のフィルタリングフィールド (ソース IP、ターゲット IP、ソースポート、ターゲットポート) があるのに対し、高度なフィルタリングフィールドは pcap 式 (ネットワークトラフィックのフィルタリング式の標準) によって定義され、あらゆる種類を使用することができます。

NetFlow 監視の有効化

When creating the filter, monitoring can be activated by enabling the Enable NetFlow monitoring token.

フィルターを作成するときに、Enable NetFlow monitoring トークン を有効にすることでフィルタ監視を有効にできます。

  • This allows creating an agent that monitors the traffic volume of this filter.
  • It creates a module that measures if the traffic of any IP address in this filter exceeds a certain threshold.
  • A text-type module will be created with the traffic rate of each IP address within this filter every five minutes (the top 10 IP addresses with the most traffic).
  • これにより、このフィルタのトラフィック量を監視するエージェントを作成できるようになります。
  • このフィルタ内のいずれかの IP アドレスからのトラフィックが特定のしきい値を超えているかどうかを測定するモジュールを作成します。
  • このフィルター内の各 IP アドレスのトラフィックレートを含むテキストモジュールが 5 分ごとに作成されます (最もトラフィックが多い 10 個の IP アドレス)。

The parameters are as follows:

パラメータは次の通りです。

  • Maximum traffic value of the filter: Specifies the maximum rate (in bytes per second) of the filter traffic. It is subsequently 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 established percentage, the WARNING state will be generated.
  • CRITICAL threshold for the maximum % of traffic for an IP: If any IP address within the filter exceeds the established percentage, the CRITICAL state will be generated.
  • フィルタの最大トラフィック値(Maximum traffic value of the filter): フィルタトラフィックの最大レート (バイト/秒) を指定します。 次に、これを使用して、IP アドレスごとの最大トラフィックの割合が計算されます。
  • IP のトラフィックの最大 % の警告しきい値(WARNING threshold for the maximum % of traffic for an IP): フィルタ内のいずれかの IP アドレスが設定された割合を超えると、警告状態が生成されます。
  • IP のトラフィックの最大 % の障害しきい値(CRITICAL threshold for the maximum % of traffic for an IP): フィルタ内のいずれかの IP アドレスが設定された割合を超えると、障害状態が生成されます。

NetFlow reports are integrated with Pandora FMS reports.

NetFlow レポートは Pandora FMS レポート と統合されています。

To create a report element, choose one of the available NetFlow report elements.

新たにレポートアイテムを作成するには、netflow レポートアイテムの一つを選択します。

The following configuration options are available:

以下の設定オプションが利用可能です。

  • Type: The element types will be explained below.
  • Filter: NetFlow filter to use.
  • Period: Length of the data interval to show.
  • Resolution: Some reports require samples to be collected every certain period. This parameter serves to define the number of samples. Resolution can be low (6 samples), medium (12 samples), high (24 samples), or ultra-high (30 samples). There are two special values (hourly and daily) so that a fixed number of samples is not collected, but one every certain period of hours or days.
  • Max. values: Maximum number of elements for aggregates. If an HTTP traffic chart is aggregated by source IP address and this token is configured to 5, only five IP addresses will be shown.
  • タイプ(Type): 以下に説明するアイテムのタイプです。
  • フィルター(Filter): 利用する Netflow フィルタです。
  • 間隔(Period): データを表示する期間です。
  • 解像度(Resolution): データは、解像度に指定したサイズで取得されます。もし、間隔/解像度を最大グラフ解像度より大きく設定すると、動的に再調整されます。例えば、間隔が 1日で、解像度が 1時間の場合、24ポイントがグラフに表示されます。
  • 最大値(Max. values): 集約する要素の最大値です。例えば、HTTP トラフィックのグラフを書く場合、ソースIPアドレスで集約し、最大値が 5 であれば、5つの IP アドレスのみが表示されます。

There are three types of NetFlow report elements:

netflow レポートのアイテムは、3種類あります。

  • NetFlow area chart: An area chart, aggregated or non-aggregated.
  • NetFlow data chart: A text representation of the area chart.
  • NetFlow summary chart: Traffic summary for the given period. There are three elements: a table with global information, a pie chart with the most relevant IP addresses or port numbers, and a table with the same information from the pie chart broken down.
  • NetFlow 塗りつぶしグラフ(NetFlow area chart): 集約または未集約の塗りつぶしグラフです。
  • NetFlow データ一覧(NetFlow data table): 塗りつぶしグラフをテキストで表したものです。
  • Netflow サマリグラフ(Netflow summary chart): 指定した間隔のトラフィックサマリです。グローバル情報を含む表、最も関連性のある IP またはポートを含む円グラフ、分割された円グラフと同じ情報を含む表の 3つの要素があります。

This view is used to consult the history of captured data based on different search filters. Filters and different ways of displaying information can be used. The way to group the information shown must be defined, as well as the way to obtain said information to start visualizing data.

この表示は、さまざまな検索フィルタに基づいて取得されたデータの履歴を調べるために使用します。フィルタを使用して、さまざまな異なる情報を表示することができます。データの視覚化をするには、表示された情報をグループ化する方法と、この情報を取得する方法があります。

Filters can be viewed in real time from Operation → Monitoring → Network → NetFlow Live View. This tool allows visualizing the changes made to a filter and saving it once the desired result is obtained. It is also possible to load and modify existing filters.

フィルタした情報は、操作(Operation)モニタリング(Monitoring)ネットワーク(Network)Netflow ライブビュー(Netflow Live View) から表示できます。このツールで、フィルタの変更のプレビューおよび、好みの出力結果を保存できます。設定したフィルタをロードし編集することもできます。

Information can be obtained by: source IP address, destination IP address, source port number, or destination port number. If destination IP address information is chosen to be shown, information will be displayed sorted by IP addresses with the most traffic to the destination from highest to lowest. The same would apply to knowing your network consumption by protocol, choosing by destination port number.

情報を取得する方法は、送信元 IP アドレス、宛先 IP アドレス、送信元ポート、または宛先ポートです。 たとえば、宛先 IP アドレス情報を表示することを選択した場合、情報は、宛先へのトラフィックが最も多い IP アドレスによって、最高から最低の順に並べ替えられて表示されます。 宛先ポートを選択して、プロトコルごとのネットワークの消費量を見る場合も同じことが行われます。

The possible visualization ways are as follows:

可能な表示方法は以下の通りです。

  • Area graph: Displays area charts, of the stacked type, over time (from the source date to the destination date), the evolution of the data. The level of precision of the chart must be chosen in the “Resolution” token.
  • Circular mesh: Displays an interactive circular mesh graph representing connection pairs between IP and traffic volume.
  • Data table: Displays a data table with each IP address and a number of rows depending on the chosen resolution.
  • Detailed host trafic: Shows a portion map with detailed host traffic representing traffic by IP.
  • Summary: Shows a summary table, a pie chart, and a table with the data for the entire period.
  • Top-N connections: A table that shows the “TOP-N” connections between Source IP address - Destination IP address pairs, based on traffic between those IP addresses (the sum of the percentages of the N elements in the table will not necessarily be one hundred because there may be other connection pairs src/dst).
  • 塗りつぶしグラフ(Area graph): 積み上げ型のエリアグラフを、時間経過(開始日から終了日まで)に沿って表示し、データの推移を示します。グラフの精度は「解像度」トークンで選択する必要があります。
  • 円形メッシュ(Circular mesh): IPアドレスとトラフィック量間の接続ペアを表すインタラクティブな円形メッシュグラフを表示します。
  • データテーブル(Data table): 各IPアドレスと、選択した解像度に応じた行数のデータテーブルを表示します。
  • ホストトラフィック詳細(Detailed host trafic): IPアドレスごとのトラフィックを表すホストトラフィックの詳細を示す部分マップを表示します。
  • 概要(Summary): 全期間のデータを含む概要テーブル、円グラフ、およびテーブルを表示します。
  • トップ N 個の接続(Top-N connections): 送信元 IP アドレスと宛先 IP アドレスのペア間のトラフィックに基づいて、それらの IP アドレス間の「上位 N」個の接続を示す表です (表の N 個の要素のパーセンテージの合計は、他の接続ペア src/dst が存在する可能性があるため、必ずしも 100 になるとは限りません)。

Allows creating dynamic network maps based on traffic between nodes. Shows the relationship (connections) between different addresses, showing the N most important connections (by size of data transferred between them).

これにより、ノード間のトラフィックに基づいて動的なネットワーク マップを作成できます。 異なるアドレス間の関係 (接続) が表示され、最も重要な N 個の接続が (接続間で転送されるデータのサイズごとに) 表示されます。

It is possible to locate the Pandora FMS node that collects NetFlow data on a host independent of the Web Console. In environments with a lot of NetFlow data, it is more than recommended to locate it on a server with fast disks and a fast CPU with two or more cores. For the Web Console to extract NetFlow data, it will be necessary to modify the default system configuration:

コンソールから独立したホスト上に Netflow データを収集する pandora ノードを配置することも可能です。大量の Netflow データがある環境では、高速ディスクと 2コア以上の高速 CPU を備えたサーバに配置することをお勧めします。 Pandora コンソールがNetflow データを抽出するためには、以下の手順に従ってシステムのデフォルト設定を変更する必要があります。

  • Configure automatic SSH authentication between the user owner of the web daemon and the user capable of executing nfdump on the collector node.
  • Web デーモンを実行するユーザと、コレクターノードで nfdump を実行するユーザとの間の自動 SSH 認証を構成します。

To perform this configuration, follow these steps:

その設定には、次の手順を実行する必要があります。

Only for Pandora FMS environments on EL 8

EL 8 上の Pandora FMS 環境のみ

  • First create the folder where the Apache2 SSH keys will be stored:
  • まず、Apache SSH 鍵を保存するフォルダーを作成します。
mkdir /usr/share/httpd/.ssh/
  • Grant permissions to Apache on the created folder:
  • 作成したフォルダーに対して Apache に権限を付与します。
chown -R apache. /usr/share/httpd/.ssh/
  • Login to BASH with Apache (the terminal user will change):
  • Apache で BASH ログインします (ターミナルユーザが変わります)。
su apache -s /bin/bash
  • Now generate SSH keys with Apache user:
  • 次に、Apache ユーザーで SSH 鍵を生成します。
ssh-keygen
  • Copy the keys to the target machine, this step will request the credentials of the user of the remote machine:
  • 鍵をターゲットマシンにコピーします。この手順では、リモートマシンのユーザの資格情報が要求されます。
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 接続が成功することを確認します。
ssh < User >@< IP_Address >

From the Pandora FMS configuration, in the NetFlow section, you can fill in the Remote Settings section with the above data to access the remote NetFlow data:

Pandora FMS 設定の NetFlow セクションで、リモート設定(Remote Settings) セクションに前のデータを入力して、NetFlow リモートデータにアクセスできます。

As of version 770 of Pandora FMS, support for sFlow is included, which is a network protocol that is an industrial standard in hardware manufacturing for data network traffic.

Pandora FMS バージョン 770 以降では、sFlow のサポートが含まれています。sFlow は、データネットワークトラフィック用のハードウェアにおける業界標準のネットワークプロトコルです。

The operation of sFlow in PFMS is similar to the one established with NetFlow. In case both protocols are active, data will be grouped; in any case, they will always be viewed by accessing the Operation menu in the left sidebar, and then clicking on Views → Network.

Pandora FMS での sFlow の動作は NetFlow で確立しているものと同様 です。 両方のプロトコルが有効な場合、データはグループ化されます。いずれの場合も、左側のサイドバーの 操作(Operation) メニューにアクセスし、ネットワーク(Network) をクリックすると、常に表示されます。

NG 775 version or later.

バージョン NG 775 以降

Enable sFlow to be accessible from the Operation and Management menus. Under the NetFlow configuration section, there is an option to enable or disable sFlow globally.

操作管理 メニューからアクセスできるように、sFlow を有効化する必要があります。 NetFlow 設定セクションに、sFlow をグローバルに有効または無効にするオプションがあります。

A new tab will be enabled specifically for sFlow:

sFlow 専用の新しいタブが有効になります。

  • Data storage path: Directory where the sFlow data files are to be stored (see General Setup).
  • Daemon binary path: Path to the binary of nfcapd.
  • Nfdump binary path: Path to the binary of nfdump.
  • Nfexpire binary path: Path to the binary of nfexpire.
  • Maximum chart resolution: Maximum number of points an sFlow area plot will display. The higher the resolution, the worse the performance. Values between 50 and 100 are recommended.
  • Disable custom live view filters: Disables the definition of custom filters from the sFlow view (filters that are already created can still be used).
  • sFlow max lifetime: Indicates the maximum time in days of sFlow data to be stored.
  • Enable IP address name resolution: Enables IP address resolution to try to obtain the hostnames of sFlow devices.
  • データ保存パス(Data storage path): sFlow データファイルが保存されるディレクトリ。(一般設定を参照)
  • デーモンバイナリパス(Daemon binary path): nfcapd のバイナリのパス。
  • nfdump バイナリパス(Nfdump binary path): nfdump のバイナリのパス。
  • nfexpire バイナリパス(Nfexpire binary path): nfexpire のバイナリのパス。
  • 最大グラフ解像度(Maximum chart resolution): sFlow グラフが表示するポイントの最大数。解像度が高くなるほどパフォーマンスが低下します。 50 から 100 の間の値をお勧めします。
  • カスタムライブビューフィルタ無効化(Disable custom live view filters): sFlow 表示のカスタムフィルターの定義を無効にします (既に作成されているフィルターは引き続き使用できます)。
  • sFlow 最大保存期間(sFlow max lifetime): sFlow データを保存する最大日数を示します。
  • IP アドレス名前解決の有効化(Enable IP address name resolution): sFlow デバイスのホスト名を取得するための IP アドレス名前解決を有効にします。

Pandora FMS ドキュメント一覧に戻る

フィルタ作成

Netflow フィルターの基本的な編集画面:

この機能における設定可能な NetFlow フィルタは次のとおりです。

  • Name: It is recommended for the filter's name to be quite descriptive.
  • Group: A user can only create a filter or edit the filter of a group it has access to.
  • Filter: There are two types of filters: Basic and advanced. Advanced filters allow using advanced expressions in the same format as 'nfdump'. Basic filters can filter traffic by source and target IP and source or target port. Lists of comma-separated IPs or ports are also accepted here.
  • 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): 1ユーザは、アクセス可能なグループの一つのフィルタのみ作成または編集できます。
  • フィルタ(Filter): フィルタには、基本と拡張の 2つのタイプがあります。拡張フィルタは、nfdump と同じフォーマットの拡張表現が利用できます。基本フィルタは、発信元IP、宛先IP、発信元ポート、宛先ポートで通信をフィルタできます。カンマで区切った IP またはポートリストが利用できます。
  • 集約(Aggregate by): 通信が次の基準で集約されます:
    • 宛先 IP(DST IP address): 異なる宛先 IP ごとに通信を表示します。
    • 宛先ポート(DST port): 異なる宛先ポートごとに通信を表示します。
    • 発信元 IP(SRC IP address): 異なる発信元 IP ごとに通信を表示します。
    • 発信元ポート(SRC Port): 異なる発信元ポートごとに通信を表示します。

基本ウェブ通信フィルタの例:

高度なイントラネット通信フィルタの例:

以下に、他のフィルタ例を示します。

  • 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.1778283608.txt.gz
  • 最終更新: 2026/05/08 23:40
  • by junichi