This is a translation of the original English documentation page. Help us make it better.

7 アクティブチェックを使用してネットワークトラフィックを監視する

はじめに

このページでは、Zabbix のアクティブチェックを使用してネットワークトラフィックの基本的な監視を開始するために必要な手順を説明します。

このガイドの対象者

このガイドは、Zabbixを初めて使用するユーザー向けに設計されており、アクティブチェックを使用したネットワークトラフィックの基本的な監視を有効にするために必要な最小限の手順が記載されています。詳細なカスタマイズオプションや、より高度な設定が必要な場合は、Zabbixマニュアルの設定セクションを参照してください。

前提条件

このガイドを進める前に、お使いのOS用の手順に従って、Zabbixサーバー、Zabbixフロントエンド、およびZabbixエージェントをダウンロードしてインストールする必要があります。 Zabbixエージェントは、トラフィック監視が必要なマシンにインストールする必要があります。 これは、Zabbixサーバーがインストールされているホストと同じホストでも、別のホストでも構いません。

このガイドでは、リモートホストという名前の別のマシンでeth0インターフェースのネットワークトラフィック監視を設定する手順を説明します。

Zabbix を監視用に設定する

Zabbix エージェントは、アクティブモードとパッシブモード(同時)でメトリックを収集できます。 詳細については、パッシブおよびアクティブエージェントチェック を参照してください。 このガイドでは、アクティブチェック による監視について説明します。

Configuring Zabbix agent

1. Open the agent configuration file on the machine where the agent is installed (by default, the path is /usr/local/etc/zabbix_agentd.conf):

sudo vi /usr/local/etc/zabbix_agentd.conf

2. Add the IP address or DNS name of your Zabbix server to the ServerActive parameter. For example:

ServerActive=192.0.2.22

3. Define the Hostname parameter - it must match the host name defined in Zabbix frontend. In our example, it is:

Hostname=Remote host

4. Restart Zabbix agent:

systemctl restart zabbix-agent
Zabbix frontend

1. Log into Zabbix frontend.

2. Create a host in Zabbix web interface, specifying the IP address or DNS name of the machine on which the agent is installed.

Make sure the field Host name matches the Hostname parameter defined in the agent configuration file.

アイテムの作成

アイテムの作成の手順に従って、以下のようにトラフィック監視用のアイテムを追加します。

アクティブチェック付きの受信トラフィック監視アイテムのシンプルな設定は以下のとおりです。

収集したデータを実用に適したものにするために、いくつかのアイテム作成時に 前処理 の設定を行うことができます。 上記の例では、8倍(バイトをビットに変換)し、1秒あたりの変化として表示します。

収集データの表示

おめでとうございます!この時点で、Zabbix はすでにネットワークトラフィックを監視しています。

収集されたメトリックを表示するには、監視 → ホスト メニューセクションを開き、ホストの行にある 最新データ をクリックします。

トラフィックデータが表示されます。

See also:

  • View graphs - how to display the collected data as graphs.
  • Configure triggers - how to set up triggers to detect abnormal network traffic.
  • Set up problem alerts - how to set up notifications about problem situations.
  • Problem escalations - how to create multi-step alert scenarios (e.g., first send message to the system administrator, then, if a problem is not resolved in 45 minutes, send message to the data center manager).
  • Problem acknowledgment - how to indicate that the problem is known, make comments on resolving it, suppress or close the problem.
  • Monitor Linux with Zabbix agent - how to start basic monitoring of the most important items by linking a pre-configured template.