I've made a script to have informations from a minilink TN device
I'm sure that I've got the right MIBs because I'm using a MibBrowser
here is my code
Code: Select all
<interface>
<name>Get SNMP Minilink Interfaces</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.4.1.193.81.2.8.2.3.0</oid_index>
<oid_num_parse>OID/REGEXP:.*\.(([0-9A-F]{,2}\.){,32})$</oid_num_parse>
<oid_num_indexes>.1.3.6.1.2.1.1.1.0</oid_num_indexes>
<index_order_type>numeric</index_order_type>
<fields>
<ifserv>
<name>szsservice</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.1.7.0</oid>
</ifserv>
<ifIP>
<name>IP Address</name>
<method>walk</method>
<source>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.193.81.2.8.2.3.0</oid>
</ifIP>
</fields>
</interface>
Code: Select all
Running data query [17].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'D:/www/cacti/resource/snmp_queries/minilinktest.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.193.81.2.8.2.3.0'
+ Index found at OID: 'enterprises.193.81.2.8.2.3.0' value: 'No more variables left in this MIB View'
//the mibBrowser tell me that the response is '1'
+ Located input field 'ifserv' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.1.7.0'
+ Located input field 'ifIP' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.193.81.2.8.2.3.0'
+ Found item [ifIP='8.2.3.0'] index: 1 [from regexp oid parse]
//this isn't the correct ip adress
+ Found data query XML file at 'D:/www/cacti/resource/snmp_queries/minilinktest.xml'
+ Found data query XML file at 'D:/www/cacti/resource/snmp_queries/minilinktest.xml'
+ Found data query XML file at 'D:/www/cacti/resource/snmp_queries/minilinktest.xml'
thank you