OID <> MIB

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

OID <> MIB

Post by adrianmarsh »

Something I'm still missing about SNMP. I understand polling applications like Cacti are more interested in using OIDs, and that Agents use MIBs to define the data they hold.

But how do I use MIBs to figure out the OIDs I need for Cacti?

For example, I want to get a PSAX working. I don't know the OID of the ATM interfaces I'm looking for, but I've found some MIBs on the net that might help, but I can't see what to do with them or how to use them.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If you know the MIB name of something, then you should be able to use something like GetIF or snmpget to translate it to an OID. Alternatively, you manually look up the OID in the MIB file, but thats a pain in the butt.
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Not wanting to be a pain-in-the-youknowwhat - but could you give an example for the getif/snmpget? I've tried using some of the text-names but tend just to get errors out of the tools.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Playing around with snmpwalk....

Code: Select all

C:\netsnmp\bin>snmpwalk -v 1 -c public 127.0.0.1 sysuptime
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (57148244) 6 days, 14:44:42.44

C:\netsnmp\bin>snmpwalk -v 1 -c public -O f 127.0.0.1 sysuptime
.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.sysUpTimeInstance = Timeticks: (57159109) 6 days, 14:46:31.09

C:\netsnmp\bin>snmpwalk -v 1 -c public -O n 127.0.0.1 sysuptime
.1.3.6.1.2.1.1.3.0 = Timeticks: (57159860) 6 days, 14:46:38.60
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

"snmpwalk" can find "sysuptime" because its defined in the DISMAN-EVENT-MIB right? If it wasn't then it wouldn't be able to find it?

So if I wanted to find out an OID for something that is in a propriatory MIB, I'd have to install that MIB into net-snmp first - ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Correct.
jef
Posts: 17
Joined: Thu Aug 25, 2005 3:27 pm
Location: ./

Post by jef »

for "quick usage", i use the -m option to specify the mib file location.

snmpwalk -On hostname -c community -m /usr/share/snmp/mibs/tsight-mib.txt enterprises.corad.tSight.watchpoints.watchpointStatsCurrent
.1.3.6.1.4.1.9723.1.1.4.1.1.1.1 = INTEGER: 1
.1.3.6.1.4.1.9723.1.1.4.1.1.1.2 = INTEGER: 2

Jef
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests