Community discussions

 
pbosgraaf
just joined
Topic Author
Posts: 11
Joined: Wed Jan 22, 2014 3:24 pm

SNMP oids

Wed Jan 22, 2014 3:35 pm

Hi,

I'm trying to print some statistics using SNMP.
Executing "/interface wireless print oid" on a *station* gives me the following output:

[admin@station] > /interface wireless print oid
0 tx-rate=.1.3.6.1.4.1.14988.1.1.1.1.1.2.4
rx-rate=.1.3.6.1.4.1.14988.1.1.1.1.1.3.4
strength=.1.3.6.1.4.1.14988.1.1.1.1.1.4.4
ssid=.1.3.6.1.4.1.14988.1.1.1.1.1.5.4
bssid=.1.3.6.1.4.1.14988.1.1.1.1.1.6.4
frequency=.1.3.6.1.4.1.14988.1.1.1.1.1.7.4
band=.1.3.6.1.4.1.14988.1.1.1.1.1.8.4
tx-rate=.1.3.6.1.4.1.14988.1.1.1.3.1.2.4
rx-rate=.1.3.6.1.4.1.14988.1.1.1.3.1.3.4
ssid=.1.3.6.1.4.1.14988.1.1.1.3.1.4.4
bssid=.1.3.6.1.4.1.14988.1.1.1.3.1.5.4
client-count=.1.3.6.1.4.1.14988.1.1.1.3.1.6.4
frequency=.1.3.6.1.4.1.14988.1.1.1.3.1.7.4
band=.1.3.6.1.4.1.14988.1.1.1.3.1.8.4
noise-floor=.1.3.6.1.4.1.14988.1.1.1.3.1.9.4
overall-ccq=.1.3.6.1.4.1.14988.1.1.1.3.1.10.4

Walking the snmp tree does not return any of the mentioned oids.

[root@somehost ~]# snmpwalk -On -v 1 -c public routeros-station:161 | grep ".1.3.6.1.4.1.14988"
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.14988.1
.1.3.6.1.2.1.9999.1.1.1.2.0 = OID: .1.3.6.1.4.1.14988.1

Am i doing something wrong?
I am able to fetch other (uptime, memory, cpu) resources, just not the wireless ones.

I'm running version 6.7

Cheers,
Peter
 
pbosgraaf
just joined
Topic Author
Posts: 11
Joined: Wed Jan 22, 2014 3:24 pm

Re: SNMP oids

Wed Jan 22, 2014 5:17 pm

Answering my own question, snmpwalk does NOT return the full table.
Query on *some* of the OIDs directly does work.

Regards,
Peter
 
User avatar
dasiu
Trainer
Trainer
Posts: 232
Joined: Fri Jan 30, 2009 11:41 am
Location: Reading, UK
Contact:

Re: SNMP oids

Wed Jan 22, 2014 5:56 pm

Am i doing something wrong?
I am able to fetch other (uptime, memory, cpu) resources, just not the wireless ones.
Yes... RTFM - as some people say ;).
The snmpwalk command performs a sequence of chained GETNEXT requests automatically. It is a work saving command. Rather than having to issue a series of snmpgetnext requests, one for each object ID, or node, in a sub-tree, you can simply issue one snmpwalk request on the root node of the sub-tree and the command gets the value of every node in the sub-tree.
And now - try this:
snmpwalk -On -v 1 -c public routeros-station:161 .1.3.6.1 | grep ".1.3.6.1.4.1.14988"

You can even specify ".1" only - it doesn't matter, it gives you the whole tree, but without specifying any OID on snmpwalk parameters - it doesn't reach the MikroTik OIDs.

Who is online

Users browsing this forum: MSN [Bot] and 44 guests