Cactiのデータクエリファイルの作成手順を紹介します。
<interface>
<name>Get SNMP PP Interfaces</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.4.1.1182.2.3.9.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.4.1.1182.2.3.9.1.1</oid_num_indexes>
<index_order>yrIfPpIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<yrIfPpIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.1</oid>
</yrIfPpIndex>
<yrIfPpDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.2</oid>
</yrIfPpDescr>
<yrIfPpSpeed>
<name>Speed</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.5</oid>
</yrIfPpSpeed>
<yrIfPpAdminStatus>
<name>Status</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.7</oid>
</yrIfPpAdminStatus>
<yrIfPpInOctets>
<name>Bits In</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.10</oid>
</yrIfPpInOctets>
<yrIfPpOutOctets>
<name>Bits Out</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.16</oid>
</yrIfPpOutOctets>
</fields>
</interface>
<name>Get SNMP PP Interfaces</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.4.1.1182.2.3.9.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.4.1.1182.2.3.9.1.1</oid_num_indexes>
<index_order>yrIfPpIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
Fieldsタグ内のフィールドの書式は以下の通りです。
<yrIfPpIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1182.2.3.9.1.1</oid>
</yrIfPpIndex>
タグ名"yrIfPpIndex"は任意の名前でよいですが、mibファイルがある場合はmibの名前と揃えておくと混乱がないかと思われます。
上記のデータクエリファイルを使用して Data Queryを作成しHostテンプレートに組み込みDeviceに適用し、New Graph画面を表示させた際に、以下のデータクエリの表示となります。Inputで指定した項目が見出しになっています。