That's correct. People often use Firefox to verify XML ...
Reinhard
Data Query For Non-Indexed Table
Moderators: Developers, Moderators
Alright along the lines of this post, I've got a device which doesn't give the Index numbers (like IF-MIB::ifIndex). I've tried using a regex to extract the index numbers from an OID, but obviously not doing something correct.
C:\>snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.1458.100.22.1.2
SNMPv2-SMI::enterprises.1458.100.22.1.2.1 = Gauge32: 0
SNMPv2-SMI::enterprises.1458.100.22.1.2.2 = Gauge32: 0
SNMPv2-SMI::enterprises.1458.100.22.1.2.3 = Gauge32: 0
SNMPv2-SMI::enterprises.1458.100.22.1.2.4 = Gauge32: 0
The very last OID (.1, .2, .3 and .4) are the index numbers I'm trying to extract.
C:\>snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.1458.100.20.1.11
SNMPv2-SMI::enterprises.1458.100.20.1.11.1 = Gauge32: 4
This is the SNMP data query I've got
This is the cacti data query output:
C:\>snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.1458.100.22.1.2
SNMPv2-SMI::enterprises.1458.100.22.1.2.1 = Gauge32: 0
SNMPv2-SMI::enterprises.1458.100.22.1.2.2 = Gauge32: 0
SNMPv2-SMI::enterprises.1458.100.22.1.2.3 = Gauge32: 0
SNMPv2-SMI::enterprises.1458.100.22.1.2.4 = Gauge32: 0
The very last OID (.1, .2, .3 and .4) are the index numbers I'm trying to extract.
C:\>snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.1458.100.20.1.11
SNMPv2-SMI::enterprises.1458.100.20.1.11.1 = Gauge32: 4
This is the SNMP data query I've got
Code: Select all
<name>Get AMCC Drive info</name>
<description>Queries a host for a AMCC Drive info</description>
<oid_index>.1.3.6.1.4.1.1458.100.22.1.2</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3})$</oid_index_parse>
<oid_num_indexes>.1.3.6.1.4.1.1458.100.20.1.11</oid_num_indexes>
<index_order>amccRaidDriveControllerNumber:amccRaidDrivePortNumber:amccRaidDriveSerialNumber</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
Thoughts on what I'm missing?+ Running data query [22].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/amcc_drive.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.1458.100.22.1.2'
+ No SNMP data returned
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/amcc_drive.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/amcc_drive.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/amcc_drive.xml'
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Not exactly. You already know my HowTo
I do not recommend using the index_parse, it is not required for a "simple" index. Please strip off all header xml that are not required to ease debugging.
Please start with a single <field>, best bet is the index, using <direction> input and verify from Verbose Query, that the index is found
Reinhard
I do not recommend using the index_parse, it is not required for a "simple" index. Please strip off all header xml that are not required to ease debugging.
Please start with a single <field>, best bet is the index, using <direction> input and verify from Verbose Query, that the index is found
Reinhard
Yup, quite familiar with the SNMP Query XML Syntax document
Alright this is the XML I've reduced it to:
It still produces the same [empty] output for Verbose query. I tried changing the amccRaidDriveIndex source to <source>OID/REGEXP:.*\.([0-9]+)$</source>, but that too didn't change the output. I also tried source: index, but it too didn't do anything.
I've seen various other posts and bug reports of people trying to do the same thing I am and it eventually works in the end. Of course that was with older cacti versions...
Alright this is the XML I've reduced it to:
Code: Select all
<query>
<name>Get AMCC Drive info</name>
<description>Queries a host for a AMCC Drive info</description>
<oid_index>.1.3.6.1.4.1.1458.100.22.1.2</oid_index>
<oid_num_indexes>.1.3.6.1.4.1.1458.100.20.1.11</oid_num_indexes>
<index_order>amccRaidDriveControllerNumber:amccRaidDrivePortNumber</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<amccRaidDriveIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1458.100.22.1.2</oid>
</amccRaidDriveIndex>
</fields>
</query>
I've seen various other posts and bug reports of people trying to do the same thing I am and it eventually works in the end. Of course that was with older cacti versions...
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 3 guests