[SNMP4J] snmp get with partial indexes
Ori Liel
OriL at Radware.com
Sun Jun 29 10:13:59 CEST 2008
Hi.
I have the following SNMP problem:
I'm dealing with a very large table, which has several index columns.
For example, let's say we have index columns: Index1, Index2, Index3.
I want to get all rows where Index1="a" and Index2="b" (with no
restriction on Index3 value). The straight-forward solution would be to
get the entire table and search for the rows I want, but this is no
feasible due to the size of the table (on top of everything, I'm forced
to use SNMPv1 which doesn't have getBulk()).
I need a way to get only the rows I want - as if the SNMP table was a
database table and I were writing a query.
I've tried this solution:
I constructed an OID that only includes only the values of Index1 and
Index2. A GET command for this OID returns "No such instance", since I'm
supplying an incomplete address, but I expected that GET_NEXT would give
me the first row where I1="a" and I2="b".
(in the example below, I was hoping to get the first cell of the second
row, but I actually got the first cell of the third row).
Index1 Index2 Index3 column1 column2
g h j bla bla
a b c1 bla bla
a b c2 bla bla
a b c3 bla bla
x y Z bla bla
Right now I have no idea how to achieve what I need using the basic SNMP
commands.
Can anyone help?
Thanks,
Ori.
More information about the SNMP4J
mailing list