I'm trying to get a script to work but it's not. Maybe that someone can tell me where i made a mistake in the script as i get some output but not exactly what i want.
We have some infoblox appliances and i want to monitor the usage percentage of the created vlan's on them. I found in the mib files the corresponding OID's but they don't have a perfect index so i create one with the numbers after the 33 number.
Here is the code i wrote for it.
Code: Select all
<dhcp_utilisation>
<name>Get dhcp utilisation </name>
<description>Queries a host for a list of monitorable DHCP outputs</description>
<oid_index>.1.3.6.1.4.1.7779.3.1.1.4.1.1.1</oid_index>
<oid_index_parse>OID/REGEXP:^.{33}(.*)</oid_index_parse>
<fields>
<ibDHCPSubnetNetworkAddress>
<name>Network</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.7779.3.1.1.4.1.1.1.1</oid>
</ibDHCPSubnetNetworkAddress>
<ibDHCPSubnetNetworkMask>
<name>NetworkMask</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.7779.3.1.1.4.1.1.1.2</oid>
</ibDHCPSubnetNetworkMask>
<ibDHCPSubnetPercentUsed>
<name>Percentage</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.7779.3.1.1.4.1.1.1.3</oid>
</ibDHCPSubnetPercentUsed>
</fields>
</dhcp_utilisation>
I can't put here the info that i get back when i perform a normal snmpwalk as in the MIB this info is in a table.+ Running data query [40].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/data/cacti/resource/snmp_queries/IB-DHCPutilisation.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.7779.3.1.1.4.1.1.1'
+ Index found at OID: '1.3.6.1.4.1.7779.3.1.1.4.1.1.1.1.10.49.48.46.49.50.49.46.48.46.48' value: '10.200.2.0'
+ Index found at OID: '1.3.6.1.4.1.7779.3.1.1.4.1.1.1.2.10.49.48.46.49.50.49.46.48.46.48' value: '255.255.255.0'
+ Index found at OID: '1.3.6.1.4.1.7779.3.1.1.4.1.1.1.3.10.49.48.46.49.50.49.46.48.46.48' value: '15'
+ index_parse at OID: '1.3.6.1.4.1.7779.3.1.1.4.1.1.1.1.10.49.48.46.49.50.49.46.48.46.48' results: '10.49.48.46.49.50.49.46.48.46.48'
+ index_parse at OID: '1.3.6.1.4.1.7779.3.1.1.4.1.1.1.2.10.49.48.46.49.50.49.46.48.46.48' results: '10.49.48.46.49.50.49.46.48.46.48'
+ index_parse at OID: '1.3.6.1.4.1.7779.3.1.1.4.1.1.1.3.10.49.48.46.49.50.49.46.48.46.48' results: '10.49.48.46.49.50.49.46.48.46.48'
+ Located input field 'ibDHCPSubnetNetworkAddress' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7779.3.1.1.4.1.1.1.1'
+ Found item [ibDHCPSubnetNetworkAddress='10.200.2.0'] index: 10.49.48.46.50.48.48.46.50.46.48 [from value]
+ Located input field 'ibDHCPSubnetNetworkMask' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7779.3.1.1.4.1.1.1.2'
+ Found item [ibDHCPSubnetNetworkMask='255.255.255.0'] index: 10.49.48.46.49.50.49.46.48.46.48 [from value]
+ Found data query XML file at '/var/data/cacti/resource/snmp_queries/IB-DHCPutilisation.xml'
+ Found data query XML file at '/var/data/cacti/resource/snmp_queries/IB-DHCPutilisation.xml'
+ Found data query XML file at '/var/data/cacti/resource/snmp_queries/IB-DHCPutilisation.xml'
Can someone tell me what is wrong in my script and how i can solve it?
Thx,
Peter