Hello all,
I looks like indexes are a quite common question but after googling for a long time I've not been able to find a solution. I've a set of oids:
$ snmpwalk -v2c -c vCPESecret 192.168.27.112 1.3.6.1.4.1.119.2.3.237.1 -On
.1.3.6.1.4.1.119.2.3.237.1.1.1.1.0 = INTEGER: operating(3)
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.2.1 = INTEGER: 0
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.3.1 = INTEGER: 40000
from a proprietary MIB. None of them is an index and I don't know how to query those 3 values. Should I use a Data Query? Create a new Data Input? Multiple data queries, one for each oid?
any help will be really appreciated as I've been trying everything I saw for the whole day with no luck.
Thanks,
Ignacio.
[solved] Querying OIDs without an index
Moderators: Developers, Moderators
Re: Querying OIDs without an index
It depends on how complex or simple the OIDs/tables are.
One method is http://docs.cacti.net/howto:data_query_ ... _not_exist
The other would be using a script (I'd recommend php script server) to handle the logic.
One method is http://docs.cacti.net/howto:data_query_ ... _not_exist
The other would be using a script (I'd recommend php script server) to handle the logic.
| 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 |
Re: Querying OIDs without an index
BSOD2600,
thanks for your reply. Actually, my index is always 0 for most of the MIBs.
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.2.1 = INTEGER: 0
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.3.1 = INTEGER: 40000
So, can I somehow fix it and force always 1? I was even thinking on creating a fake value on smpd.conf and returning always 1. I'll try.
thanks for your reply. Actually, my index is always 0 for most of the MIBs.
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.2.1 = INTEGER: 0
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.3.1 = INTEGER: 40000
So, can I somehow fix it and force always 1? I was even thinking on creating a fake value on smpd.conf and returning always 1. I'll try.
Re: Querying OIDs without an index
Hi,
this is still not working but now I don't know why. This is the result of executing the query in debug mode:
And this is the snmpwalk result:
And this is header part of my XML:
Am I missing something? I've tried to compare this to the interface.xml and looks very similar...
thanks a lot.
PS: I got the "index" by overriding .1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1.1 in snmpd.conf:
this is still not working but now I don't know why. This is the result of executing the query in debug mode:
Code: Select all
+ Running data query [10].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/ipfe-capacity.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1' Index Count: 0
+ No SNMP data returned
Code: Select all
$ snmpwalk -v2c -c secret 192.168.1.1 .1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1 -On
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1.1 = INTEGER: 1
Code: Select all
<interface>
<name>Get IPFE info</name>
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
thanks a lot.
PS: I got the "index" by overriding .1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1.1 in snmpd.conf:
Code: Select all
override .1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.1.1 integer 1
Re: Querying OIDs without an index
you mean it's always 1, right?iverona wrote:Actually, my index is always 0 for most of the MIBs.
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.2.1 = INTEGER: 0
.1.3.6.1.4.1.119.2.3.237.1.1.3.1.1.3.1 = INTEGER: 40000
Did you try the regex trick in the first link?
| 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 |
Re: Querying OIDs without an index
Hi!
I ended up creating an SNMP data query for each of the OIDs, and it worked great.
thanks for your support!
Ignacio.
I ended up creating an SNMP data query for each of the OIDs, and it worked great.
thanks for your support!
Ignacio.
Who is online
Users browsing this forum: No registered users and 3 guests