このセクションでは、スイッチに対してSNMP 検出を実行します。
このSNMP OID検出方法は、Zabbixサーバー/プロキシ6.4以降でサポートされています。
アイテムのプロトタイプは、検出ルールのマクロを使用して、依存アイテムのプロトタイプとして作成する必要があります。
依存アイテムは、walk[]
マスターアイテムから値を取得します。そのため、検出された各アイテムが個別にSNMPデバイスにクエリを実行する必要はありません。
トリガーとグラフのプロトタイプも、検出ルールのマクロを使用して作成できます。
Dynamic indexes (for example, interface indexes) can shift when hardware is reconfigured. To accommodate this behavior, a master SNMP walk discovery rule is created with a key such as:
After SNMP walk to JSON preprocessing, the result might resemble:
A dependent item prototype uses the {#SNMPINDEX}
macro to construct the key:
Preprocessing for this prototype includes "SNMP walk value" name with "1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}" OID in the Parameter field. Format: "Unchanged".
At runtime, actual items such as net.if.in[2]
and net.if.in[3]
are created. If a given interface index changes (for example, if the index 2
is replaced by 5
in the SNMP table), then on the next run of the discovery rule:
Trigger prototype example:
Graph prototype example includes items:
This configuration ensures reliable monitoring of tables with dynamic indexes while minimizing SNMP traffic—only a single SNMP walk per poll cycle is required, with dependent item prototypes extracting the necessary values.
サーバーが実行される際、SNMP検出ルールが返す値に基づいて、実際の依存アイテム、トリガー、グラフが作成されます。