Data Querie returns only one row (GET_SNMP_Data(indexed))

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
rklan
Posts: 15
Joined: Mon Dec 03, 2007 2:56 pm

Data Querie returns only one row (GET_SNMP_Data(indexed))

Post by rklan »

Hi, I encountered a problem with retrieving data from a dynamic MIB-table.

I Have a device with a MIB table with multiple entries and an idex of 8.
I made a xml with the definition (below). When Cacti(0.8.6.j) runs parses the xml, it sais it's ok and finds one element. but it should find 60 or so.

But instead it stops after the first item. (index)

Can someone help me?
The device is located at : 213.93.28.67 communitystring public.

Below is the debugscreen:
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/r1/cacti-0.8.6j/resource/snmp_queries/rdesign_wind.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.18.1.3.1.1'
+ Located input field 'parIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.18.1.3.1.1'
+ Found item [parIndex='0'] index: 1 [from value]
+ Found data query XML file at '/home/r1/cacti-0.8.6j/resource/snmp_queries/rdesign_wind.xml'
+ Found data query XML file at '/home/r1/cacti-0.8.6j/resource/snmp_queries/rdesign_wind.xml'
+ Found data query XML file at '/home/r1/cacti-0.8.6j/resource/snmp_queries/rdesign_wind.xml'
+ Found data query XML file at '/home/r1/cacti-0.8.6j/resource/snmp_queries/rdesign_wind.xml'
Attachments
rdesign_wind.xml
This is the xml i created.
(3.99 KiB) Downloaded 169 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post an snmpwalk for that very table
Reinhard
rklan
Posts: 15
Joined: Mon Dec 03, 2007 2:56 pm

Post by rklan »

Hi,
With snmpwalk I don't get a result. I dont know how it works yet...
But with software from MG-soft it looks like:
parIndex.1 (integer) 0
2: parChannel.1 (integer) 2098
3: parVermogen.1 (integer) 0
4: parWindsnelheid.1 (integer) 123
5: parWindrichting.1 (integer) 112
6: parTotalProduktie.1 (integer) 0
7: parTotalVermogen.1 (integer) 0
8: parStroom.1 (integer) 0
9: parAvail.1 (integer) 23
10: parDraaiuren.1 (integer) 1156743
11: parProduktie.1 (integer) 65090
12: parBeschikbaar.1 (integer) 10
13: parIndex.2 (integer) 1
14: parChannel.2 (integer) 1839
15: parVermogen.2 (integer) 0
16: parWindsnelheid.2 (integer) 0
17: parWindrichting.2 (integer) 0
18: parTotalProduktie.2 (integer) 0
19: parTotalVermogen.2 (integer) 0
20: parStroom.2 (integer) 0
21: parAvail.2 (integer) 0
22: parDraaiuren.2 (integer) 0
................

The Base OID is: .1.3.6.1.4.1.18.1.3.1.1


you can try an snmpwalk on 213.93.28.67 comm string public.

Thanks!
rklan
Posts: 15
Joined: Mon Dec 03, 2007 2:56 pm

snmpwalk works!!

Post by rklan »

Yes it works! SNMPwalk at least. but also one row

[rdata@vs2193047 ~]$ >= SNMPv2-SMI::enterprises.18.1.3.1.1.2
-bash: SNMPv2-SMI::enterprises.18.1.3.1.1.2: command not found
[rdata@vs2193047 ~]$
[rdata@vs2193047 ~]$ snmpwalk -c public -v 1 213.93.28.67 1.3.6.1.4.1.18.1.3
SNMPv2-SMI::enterprises.18.1.3.1.1.1 = INTEGER: 0
SNMPv2-SMI::enterprises.18.1.3.1.2.1 = INTEGER: 2081
SNMPv2-SMI::enterprises.18.1.3.1.3.1 = INTEGER: 0
SNMPv2-SMI::enterprises.18.1.3.1.4.1 = INTEGER: 123
SNMPv2-SMI::enterprises.18.1.3.1.5.1 = INTEGER: 112
SNMPv2-SMI::enterprises.18.1.3.1.6.1 = INTEGER: 0
SNMPv2-SMI::enterprises.18.1.3.1.7.1 = INTEGER: 0
SNMPv2-SMI::enterprises.18.1.3.1.8.1 = INTEGER: 0
SNMPv2-SMI::enterprises.18.1.3.1.9.1 = INTEGER: 23
SNMPv2-SMI::enterprises.18.1.3.1.10.1 = INTEGER: 1156743
SNMPv2-SMI::enterprises.18.1.3.1.11.1 = INTEGER: 65090
SNMPv2-SMI::enterprises.18.1.3.1.12.1 = INTEGER: 10
SNMPv2-SMI::enterprises.18.1.3.1.1.2 = INTEGER: 1
Error: OID not increasing: SNMPv2-SMI::enterprises.18.1.3.1.12.1
>= SNMPv2-SMI::enterprises.18.1.3.1.1.2

can i tell cacti to ignore that OID is not increasing??

Or is that no problem?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Yes, you'll have to use a regex though to handle it. Search the forum for other examples. Another example of one would be in cacti\resource\snmp_queries\interface.xml
rklan
Posts: 15
Joined: Mon Dec 03, 2007 2:56 pm

Data Querie returns only one row (GET_SNMP_Data(indexed))

Post by rklan »

I don't understand.
How to use the regex...
is this the sollution?
it reads every element, but stopw at the end of the row....
can anyone help?

Even the interface table doesn't return more than one row..
should be 2.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests