Code: Select all
<interface>
<name>Get OptiDriver port list for optical diagnostics</name>
<oid_index>.1.3.6.1.4.1.629.200.8.1.1.1</oid_index>
<oid_index_parse>OID/REGEXP:^.{29}(.*)</oid_index_parse>
<index_order>nbsCmmcPortChassisIndex</oid_index_order>
<index_order_type>numeric</index_order_type>
<fields>
<nbsCmmcPortChassisIndex>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</nbsCmmcPortChassisIndex>
<nbsCmmcPortName>
<name>Port Name</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.21</oid>
</nbsCmmcPortName>
<nbsCmmcPortTxPower>
<name>Transmit Power</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.31</oid>
</nbsCmmcPortTxPower>
<nbsCmmcPortRxPower>
<name>Receive Power</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.32</oid>
</nbsCmmcPortRxPower>
</fields>
</interface>
.1.3.6.1.4.1.629.200.8.1.1.1.1.14.1 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.14.2 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.14.3 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.14.4 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.16.1 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.16.2 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.16.3 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.16.4 (integer) 1
.1.3.6.1.4.1.629.200.8.1.1.1.1.16.5 (integer) 1
This is what I get when I do a verbose query:
Code: Select all
Total: 0.000000, Delta: 0.000000, Running data query [27].
Total: 0.000000, Delta: 0.000000, Found type = '3' [SNMP Query].
Total: 0.010000, Delta: 0.000000, Found data query XML file at '/var/www/XXXXXXXX/htdocs/resource/snmp_queries/optidriver_ports3.xml'
Total: 0.010000, Delta: 0.000000, Error parsing XML file into an array.
Total: 0.010000, Delta: 0.000000, Found data query XML file at '/var/www/XXXXXXXX/htdocs/resource/snmp_queries/optidriver_ports3.xml'
Total: 0.010000, Delta: 0.000000, Found data query XML file at '/var/www/XXXXXXXX/htdocs/resource/snmp_queries/optidriver_ports3.xml'
Total: 0.010000, Delta: 0.000000, Update data query sort cache complete
Total: 0.010000, Delta: 0.000000, Updated data query index ordering
Total: 0.010000, Delta: 0.000000, Found data query XML file at '/var/www/XXXXXXXX/htdocs/resource/snmp_queries/optidriver_ports3.xml'
Total: 0.020000, Delta: 0.010000, Update re-index cache complete
Total: 0.020000, Delta: 0.000000, Update graph data query cache complete
Total: 0.020000, Delta: 0.000000, Update data source data query cache complete
Total: 0.020000, Delta: 0.000000, Update data query cache complete
Total: 0.020000, Delta: 0.000000, Update poller cache from query complete
Total: 0.020000, Delta: 0.000000, Automation execute data query complete
Total: 0.020000, Delta: 0.000000, Plugin hooks complete
EDIT: I finally got it working. This is what I ended up with, after correcting a 'direction' mistake and modifying the regex.
Code: Select all
<interface>
<name>Get OptiDriver port list for optical diagnostics</name>
<oid_index>.1.3.6.1.4.1.629.200.8.1.1.3</oid_index>
<oid_index_parse>OID/REGEXP:^.*([12]\.[0-9][0-9]{0,1}\.[0-9][0-9]{0,1})$</oid_index_parse>
<index_order>nbsCmmcPortIndex</index_order>
<index_order_type>alphabetic</index_order_type>
<fields>
<nbsCmmcPortIndex>
<name>nbsCmmcPortIndex</name>
<method>walk</method>
<source>OID/REGEXP:^.*([12]\.[0-9][0-9]{0,1}\.[0-9][0-9]{0,1})$</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.3</oid>
</nbsCmmcPortIndex>
<nbsCmmcPortName>
<name>Port Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.21</oid>
</nbsCmmcPortName>
<nbsCmmcPortTxPower>
<name>Transmit Power</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.31</oid>
</nbsCmmcPortTxPower>
<nbsCmmcPortRxPower>
<name>Receive Power</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.629.200.8.1.1.32</oid>
</nbsCmmcPortRxPower>
</fields>
</interface>